Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
13 | public function testGetMapUrl() |
||
14 | { |
||
15 | $map = [ |
||
16 | 'class' => \codru\staticmap\types\OpenStreet::className(), |
||
17 | 'options' => [ |
||
18 | 'center' => '40,50', |
||
19 | 'zoom' => '15', |
||
20 | 'size' => '1024x200', |
||
21 | 'markers' => [ |
||
22 | '40,50', |
||
23 | 'ol-marker', |
||
24 | ], |
||
25 | ], |
||
26 | ]; |
||
27 | $this->assertEquals( |
||
28 | 'http://staticmap.openstreetmap.de/staticmap.php?center=40,50&zoom=15&size=1024x200&markers=40,50,ol-marke', |
||
29 | Yii::createObject($map)->getMapUrl() |
||
30 | ); |
||
31 | } |
||
32 | } |
||
33 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.