| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 13 | public function testGetMapUrl() |
||
| 14 | { |
||
| 15 | $map = [ |
||
| 16 | 'class' => \codru\staticmap\types\Google::className(), |
||
| 17 | 'options' => [ |
||
| 18 | 'center' => '40,50', |
||
| 19 | 'zoom' => '13', |
||
| 20 | 'size' => '640x100', |
||
| 21 | 'scale' => '2', |
||
| 22 | 'markers' => [ |
||
| 23 | 'size' => 'tiny', |
||
| 24 | '40,50', |
||
| 25 | ], |
||
| 26 | ], |
||
| 27 | ]; |
||
| 28 | $this->assertEquals( |
||
| 29 | 'http://maps.googleapis.com/maps/api/staticmap?center=40,50&zoom=13&size=640x100&scale=2&markers=size:tiny|40,5', |
||
| 30 | Yii::createObject($map)->getMapUrl() |
||
| 31 | ); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |
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.