|
@@ 183-196 (lines=14) @@
|
| 180 |
|
$this->assertSame('key', $this->container->get('ivory.google_map.helper.renderer.loader')->getKey()); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
public function testDirections() |
| 184 |
|
{ |
| 185 |
|
$this->loadConfiguration($this->container, 'directions'); |
| 186 |
|
$this->container->compile(); |
| 187 |
|
|
| 188 |
|
$directions = $this->container->get('ivory.google_map.directions'); |
| 189 |
|
|
| 190 |
|
$this->assertInstanceOf(Directions::class, $directions); |
| 191 |
|
$this->assertSame($this->client, $directions->getClient()); |
| 192 |
|
$this->assertSame($this->messageFactory, $directions->getMessageFactory()); |
| 193 |
|
$this->assertTrue($directions->isHttps()); |
| 194 |
|
$this->assertSame(Directions::FORMAT_JSON, $directions->getFormat()); |
| 195 |
|
$this->assertFalse($directions->hasBusinessAccount()); |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
public function testDirectionsHttps() |
| 199 |
|
{ |
|
@@ 266-279 (lines=14) @@
|
| 263 |
|
$this->container->compile(); |
| 264 |
|
} |
| 265 |
|
|
| 266 |
|
public function testDistanceMatrix() |
| 267 |
|
{ |
| 268 |
|
$this->loadConfiguration($this->container, 'distance_matrix'); |
| 269 |
|
$this->container->compile(); |
| 270 |
|
|
| 271 |
|
$distanceMatrix = $this->container->get('ivory.google_map.distance_matrix'); |
| 272 |
|
|
| 273 |
|
$this->assertInstanceOf(DistanceMatrix::class, $distanceMatrix); |
| 274 |
|
$this->assertSame($this->client, $distanceMatrix->getClient()); |
| 275 |
|
$this->assertSame($this->messageFactory, $distanceMatrix->getMessageFactory()); |
| 276 |
|
$this->assertTrue($distanceMatrix->isHttps()); |
| 277 |
|
$this->assertSame(DistanceMatrix::FORMAT_JSON, $distanceMatrix->getFormat()); |
| 278 |
|
$this->assertFalse($distanceMatrix->hasBusinessAccount()); |
| 279 |
|
} |
| 280 |
|
|
| 281 |
|
public function testDistanceMatrixHttps() |
| 282 |
|
{ |
|
@@ 352-365 (lines=14) @@
|
| 349 |
|
$this->container->compile(); |
| 350 |
|
} |
| 351 |
|
|
| 352 |
|
public function testGeocoder() |
| 353 |
|
{ |
| 354 |
|
$this->loadConfiguration($this->container, 'geocoder'); |
| 355 |
|
$this->container->compile(); |
| 356 |
|
|
| 357 |
|
$geocoder = $this->container->get('ivory.google_map.geocoder'); |
| 358 |
|
|
| 359 |
|
$this->assertInstanceOf(GeocoderProvider::class, $geocoder); |
| 360 |
|
$this->assertSame($this->client, $geocoder->getClient()); |
| 361 |
|
$this->assertSame($this->messageFactory, $geocoder->getMessageFactory()); |
| 362 |
|
$this->assertTrue($geocoder->isHttps()); |
| 363 |
|
$this->assertSame(GeocoderProvider::FORMAT_JSON, $geocoder->getFormat()); |
| 364 |
|
$this->assertFalse($geocoder->hasBusinessAccount()); |
| 365 |
|
} |
| 366 |
|
|
| 367 |
|
public function testGeocoderHttps() |
| 368 |
|
{ |
|
@@ 438-451 (lines=14) @@
|
| 435 |
|
$this->container->compile(); |
| 436 |
|
} |
| 437 |
|
|
| 438 |
|
public function testTimeZone() |
| 439 |
|
{ |
| 440 |
|
$this->loadConfiguration($this->container, 'time_zone'); |
| 441 |
|
$this->container->compile(); |
| 442 |
|
|
| 443 |
|
$timeZone = $this->container->get('ivory.google_map.time_zone'); |
| 444 |
|
|
| 445 |
|
$this->assertInstanceOf(TimeZone::class, $timeZone); |
| 446 |
|
$this->assertSame($this->client, $timeZone->getClient()); |
| 447 |
|
$this->assertSame($this->messageFactory, $timeZone->getMessageFactory()); |
| 448 |
|
$this->assertTrue($timeZone->isHttps()); |
| 449 |
|
$this->assertSame(TimeZone::FORMAT_JSON, $timeZone->getFormat()); |
| 450 |
|
$this->assertFalse($timeZone->hasBusinessAccount()); |
| 451 |
|
} |
| 452 |
|
|
| 453 |
|
/** |
| 454 |
|
* @expectedException \InvalidArgumentException |