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