These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Maps\Test; |
||
4 | |||
5 | use Maps\Elements\Location; |
||
6 | |||
7 | /** |
||
8 | * @covers MapsGeocode |
||
9 | * |
||
10 | * @group Maps |
||
11 | * @group ParserHook |
||
12 | * |
||
13 | * @licence GNU GPL v2+ |
||
14 | * @author Jeroen De Dauw < [email protected] > |
||
15 | */ |
||
16 | class GeocodeTest extends ParserHookTest { |
||
17 | |||
18 | /** |
||
19 | * @see ParserHookTest::getInstance |
||
20 | * @since 2.0 |
||
21 | * @return \ParserHook |
||
22 | */ |
||
23 | protected function getInstance() { |
||
24 | return new \MapsGeocode(); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @see ParserHookTest::parametersProvider |
||
29 | * @since 2.0 |
||
30 | * @return array |
||
31 | */ |
||
32 | public function parametersProvider() { |
||
33 | $paramLists = []; |
||
34 | |||
35 | $paramLists[] = [ 'location' => 'new york city' ]; |
||
36 | |||
37 | return $this->arrayWrap( $paramLists ); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @see ParserHookTest::processingProvider |
||
42 | * @since 3.0 |
||
43 | * @return array |
||
44 | */ |
||
45 | public function processingProvider() { |
||
46 | $argLists = []; |
||
47 | |||
48 | $values = [ |
||
49 | 'location' => '4,2', |
||
50 | 'allowcoordinates' => 'yes', |
||
51 | ]; |
||
52 | |||
53 | $expected = [ |
||
54 | 'location' => new Location( new \DataValues\LatLongValue( 4, 2 ) ), |
||
0 ignored issues
–
show
|
|||
55 | 'allowcoordinates' => true, |
||
56 | ]; |
||
57 | |||
58 | $argLists[] = [ $values, $expected ]; |
||
59 | |||
60 | return $argLists; |
||
61 | } |
||
62 | |||
63 | } |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.