コード例 #1
0
 /**
  * testGeocodingWillReturnAnArray
  */
 public function testGeocodingWillReturnAnArray()
 {
     $responseMock = $this->prophesize(StreamInterface::class);
     $responseMock->getContents()->willReturn('[ { "foo": "bar" }, { "123": 456 } ]');
     $this->httpAdapterMock->get(Argument::type('string'))->willReturn($responseMock->reveal());
     $googleMapsGeoCoder = new GoogleMaps($this->httpAdapterMock->reveal(), false, 'xoxo');
     $results = $googleMapsGeoCoder->geocode('Schützenstraße 8, 10117 Berlin, Deutschland');
     $this->assertInternalType('array', $results);
 }