Conditions | 1 |
Paths | 1 |
Total Lines | 42 |
Code Lines | 33 |
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 | |||
12 | $pages = NearestPOIPage::get(); |
||
13 | error_log($pages->first()->PointsOfInterestLayerID); |
||
14 | |||
15 | // location is MBK |
||
16 | $url = '/station-finder/find?lat=13.7444513&lng=100.5290196'; |
||
17 | $response = $this->get($url); |
||
18 | $this->assertEquals(200, $response->getStatusCode()); |
||
|
|||
19 | $expected = array( |
||
20 | 'Ratchathewi', |
||
21 | 'Phaya Thai', |
||
22 | 'Chit Lom', |
||
23 | 'Victory Monument', |
||
24 | 'Nana', |
||
25 | 'Sanam Pao', |
||
26 | 'Ari', |
||
27 | 'Saphan Khwai', |
||
28 | 'Mo Chit' |
||
29 | ); |
||
30 | $this->assertExactMatchBySelector('table#nearestPOIs td.name', $expected); |
||
31 | |||
32 | // location is victory monument |
||
33 | $url = '/station-finder/find?lat=13.7650776&lng=100.5369724'; |
||
34 | $response = $this->get($url); |
||
35 | $this->assertEquals(200, $response->getStatusCode()); |
||
36 | $expected = array( |
||
37 | 'Victory Monument', |
||
38 | 'Phaya Thai', |
||
39 | 'Sanam Pao', |
||
40 | 'Ratchathewi', |
||
41 | 'Ari', |
||
42 | 'Chit Lom', |
||
43 | 'Nana', |
||
44 | 'Saphan Khwai', |
||
45 | 'Mo Chit' |
||
46 | ); |
||
47 | $this->assertExactMatchBySelector('table#nearestPOIs td.name', $expected); |
||
48 | } |
||
49 | |||
51 |
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.