@@ 268-281 (lines=14) @@ | ||
265 | $this->container->compile(); |
|
266 | } |
|
267 | ||
268 | public function testDistanceMatrix() |
|
269 | { |
|
270 | $this->loadConfiguration($this->container, 'distance_matrix'); |
|
271 | $this->container->compile(); |
|
272 | ||
273 | $distanceMatrix = $this->container->get('ivory.google_map.distance_matrix'); |
|
274 | ||
275 | $this->assertInstanceOf(DistanceMatrix::class, $distanceMatrix); |
|
276 | $this->assertSame($this->client, $distanceMatrix->getClient()); |
|
277 | $this->assertSame($this->messageFactory, $distanceMatrix->getMessageFactory()); |
|
278 | $this->assertTrue($distanceMatrix->isHttps()); |
|
279 | $this->assertSame(DistanceMatrix::FORMAT_JSON, $distanceMatrix->getFormat()); |
|
280 | $this->assertFalse($distanceMatrix->hasBusinessAccount()); |
|
281 | } |
|
282 | ||
283 | public function testDistanceMatrixHttps() |
|
284 | { |
|
@@ 354-367 (lines=14) @@ | ||
351 | $this->container->compile(); |
|
352 | } |
|
353 | ||
354 | public function testElevation() |
|
355 | { |
|
356 | $this->loadConfiguration($this->container, 'elevation'); |
|
357 | $this->container->compile(); |
|
358 | ||
359 | $elevation = $this->container->get('ivory.google_map.elevation'); |
|
360 | ||
361 | $this->assertInstanceOf(Elevation::class, $elevation); |
|
362 | $this->assertSame($this->client, $elevation->getClient()); |
|
363 | $this->assertSame($this->messageFactory, $elevation->getMessageFactory()); |
|
364 | $this->assertTrue($elevation->isHttps()); |
|
365 | $this->assertSame(Elevation::FORMAT_JSON, $elevation->getFormat()); |
|
366 | $this->assertFalse($elevation->hasBusinessAccount()); |
|
367 | } |
|
368 | ||
369 | public function testElevationHttps() |
|
370 | { |
|
@@ 437-450 (lines=14) @@ | ||
434 | $this->container->compile(); |
|
435 | } |
|
436 | ||
437 | public function testGeocoder() |
|
438 | { |
|
439 | $this->loadConfiguration($this->container, 'geocoder'); |
|
440 | $this->container->compile(); |
|
441 | ||
442 | $geocoder = $this->container->get('ivory.google_map.geocoder'); |
|
443 | ||
444 | $this->assertInstanceOf(GeocoderProvider::class, $geocoder); |
|
445 | $this->assertSame($this->client, $geocoder->getClient()); |
|
446 | $this->assertSame($this->messageFactory, $geocoder->getMessageFactory()); |
|
447 | $this->assertTrue($geocoder->isHttps()); |
|
448 | $this->assertSame(GeocoderProvider::FORMAT_JSON, $geocoder->getFormat()); |
|
449 | $this->assertFalse($geocoder->hasBusinessAccount()); |
|
450 | } |
|
451 | ||
452 | public function testGeocoderHttps() |
|
453 | { |
|
@@ 523-536 (lines=14) @@ | ||
520 | $this->container->compile(); |
|
521 | } |
|
522 | ||
523 | public function testTimeZone() |
|
524 | { |
|
525 | $this->loadConfiguration($this->container, 'time_zone'); |
|
526 | $this->container->compile(); |
|
527 | ||
528 | $timeZone = $this->container->get('ivory.google_map.time_zone'); |
|
529 | ||
530 | $this->assertInstanceOf(TimeZone::class, $timeZone); |
|
531 | $this->assertSame($this->client, $timeZone->getClient()); |
|
532 | $this->assertSame($this->messageFactory, $timeZone->getMessageFactory()); |
|
533 | $this->assertTrue($timeZone->isHttps()); |
|
534 | $this->assertSame(TimeZone::FORMAT_JSON, $timeZone->getFormat()); |
|
535 | $this->assertFalse($timeZone->hasBusinessAccount()); |
|
536 | } |
|
537 | ||
538 | /** |
|
539 | * @expectedException \InvalidArgumentException |
|
@@ 185-198 (lines=14) @@ | ||
182 | $this->assertSame('key', $this->container->get('ivory.google_map.helper.renderer.loader')->getKey()); |
|
183 | } |
|
184 | ||
185 | public function testDirection() |
|
186 | { |
|
187 | $this->loadConfiguration($this->container, 'direction'); |
|
188 | $this->container->compile(); |
|
189 | ||
190 | $direction = $this->container->get('ivory.google_map.direction'); |
|
191 | ||
192 | $this->assertInstanceOf(Direction::class, $direction); |
|
193 | $this->assertSame($this->client, $direction->getClient()); |
|
194 | $this->assertSame($this->messageFactory, $direction->getMessageFactory()); |
|
195 | $this->assertTrue($direction->isHttps()); |
|
196 | $this->assertSame(Direction::FORMAT_JSON, $direction->getFormat()); |
|
197 | $this->assertFalse($direction->hasBusinessAccount()); |
|
198 | } |
|
199 | ||
200 | public function testDirectionHttps() |
|
201 | { |