File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ Run `composer update`
45
45
$results = $client->search(array('term' => 'Sushi', 'location' => 'Chicago, IL'));
46
46
```
47
47
48
+ ### Search by phone number
49
+
50
+ ``` php
51
+ $results = $client->searchByPhone(array('phone' => '867-5309'));
52
+ ```
53
+
48
54
### Locate details for a specific business by Yelp business id
49
55
50
56
``` php
Original file line number Diff line number Diff line change @@ -62,6 +62,18 @@ public function test_It_Can_Search_Bars_In_Chicago()
62
62
$ this ->assertEquals (3 , count ($ results ->businesses ));
63
63
}
64
64
65
+ public function test_It_Can_Search_By_Phone ()
66
+ {
67
+ $ phone = '(312) 822-2900 ' ;
68
+ $ attributes = ['phone ' => $ phone ];
69
+
70
+ $ results = $ this ->client ->searchByPhone ($ attributes );
71
+
72
+ $ this ->assertInstanceOf ('stdClass ' , $ results );
73
+ $ this ->assertNotEmpty ($ results ->businesses );
74
+ $ this ->assertEquals (1 , count ($ results ->businesses ));
75
+ }
76
+
65
77
public function test_It_Can_Set_Defaults ()
66
78
{
67
79
$ default_term = 'stores ' ;
You can’t perform that action at this time.
0 commit comments