| 1 | <?php |
||
| 16 | class testGoogleMaps extends TestCase { |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @covers ::on_load |
||
| 20 | */ |
||
| 21 | public function testAutoloadWorks() { |
||
| 22 | |||
| 23 | Google_Maps::on_load(); |
||
| 24 | $this->assertTrue(class_exists(GM::class)); |
||
| 25 | |||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @covers ::make_new_map |
||
| 30 | */ |
||
| 31 | public function testMakeNewMapReturnsMyMap() { |
||
| 32 | |||
| 33 | $map = Google_Maps::make_new_map(array( |
||
| 34 | 'center' => array('lat' => 123.45, 'lng' => '-123.45') |
||
| 35 | )); |
||
| 36 | |||
| 37 | $this->assertInstanceOf(Map::class, $map); |
||
| 38 | |||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @covers ::make_marker_by_address |
||
| 43 | */ |
||
| 44 | public function testMakeMarkerByAddress() { |
||
| 45 | |||
| 46 | $marker = Google_Maps::make_marker_by_address('1600 Pennsylvania Avenue NW Washington DC'); |
||
| 47 | |||
| 48 | $this->assertInstanceOf(Marker::class, $marker); |
||
| 49 | |||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @covers ::make_marker_by_position |
||
| 54 | */ |
||
| 55 | public function testMakeMarkerByPosition() { |
||
| 56 | |||
| 57 | $marker = Google_Maps::make_marker_by_position(123.45, -123.45); |
||
| 58 | |||
| 59 | $this->assertInstanceOf(Marker::class, $marker); |
||
| 60 | |||
| 61 | } |
||
| 62 | } |