| Conditions | 1 |
| Paths | 1 |
| Total Lines | 48 |
| Code Lines | 38 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 7 | public function testFind() { |
||
| 8 | // page needs to be live |
||
| 9 | $nearPage = $this->objFromFixture('NearestPOIPage', 'StationFinder'); |
||
| 10 | $nearPage->doPublish(); |
||
| 11 | $link = $nearPage->Link(); |
||
| 12 | error_log("POI PAGE LINK:".$link); |
||
| 13 | |||
| 14 | $pages = NearestPOIPage::get(); |
||
| 15 | error_log($pages->first()->PointsOfInterestLayerID); |
||
| 16 | |||
| 17 | $url = $link; |
||
| 18 | $response = $this->get($url); |
||
| 19 | $this->assertEquals(200, $response->getStatusCode()); |
||
|
|
|||
| 20 | |||
| 21 | // location is MBK |
||
| 22 | $url = $link . 'find?lat=13.7444513&lng=100.5290196'; |
||
| 23 | $response = $this->get($url); |
||
| 24 | $this->assertEquals(200, $response->getStatusCode()); |
||
| 25 | $expected = array( |
||
| 26 | 'Ratchathewi', |
||
| 27 | 'Phaya Thai', |
||
| 28 | 'Chit Lom', |
||
| 29 | 'Victory Monument', |
||
| 30 | 'Nana', |
||
| 31 | 'Sanam Pao', |
||
| 32 | 'Ari', |
||
| 33 | 'Saphan Khwai', |
||
| 34 | 'Mo Chit' |
||
| 35 | ); |
||
| 36 | $this->assertExactMatchBySelector('table#nearestPOIs td.name', $expected); |
||
| 37 | |||
| 38 | // location is victory monument |
||
| 39 | $url = $link . 'find?lat=13.7650776&lng=100.5369724'; |
||
| 40 | $response = $this->get($url); |
||
| 41 | $this->assertEquals(200, $response->getStatusCode()); |
||
| 42 | $expected = array( |
||
| 43 | 'Victory Monument', |
||
| 44 | 'Phaya Thai', |
||
| 45 | 'Sanam Pao', |
||
| 46 | 'Ratchathewi', |
||
| 47 | 'Ari', |
||
| 48 | 'Chit Lom', |
||
| 49 | 'Nana', |
||
| 50 | 'Saphan Khwai', |
||
| 51 | 'Mo Chit' |
||
| 52 | ); |
||
| 53 | $this->assertExactMatchBySelector('table#nearestPOIs td.name', $expected); |
||
| 54 | } |
||
| 55 | |||
| 57 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.