/** * @covers Geocoder\HttpAdapter\GuzzleHttpAdapter::__construct * @covers Geocoder\HttpAdapter\GuzzleHttpAdapter::getContent */ public function testRetrievesResponse() { $historyPlugin = new HistoryPlugin(); $mockPlugin = new MockPlugin(array(new Response(200, null, 'body'))); $client = new Client(); $client->getEventDispatcher()->addSubscriber($mockPlugin); $client->getEventDispatcher()->addSubscriber($historyPlugin); $adapter = new GuzzleHttpAdapter($client); $this->assertEquals('body', $adapter->getContent('http://test.com/')); $this->assertEquals('http://test.com/', $historyPlugin->getLastRequest()->getUrl()); }