Skip to content

Commit

Permalink
test injecting adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Day committed Nov 4, 2014
1 parent 2ddad65 commit 875cb60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
'geoip' => 'ZfSnapGeoip\Service\Geoip',
'geoip_record' => 'ZfSnapGeoip\Entity\Record',
'geoip_hydrator' => 'Zend\Stdlib\Hydrator\ClassMethods',
'ZfSnapGeoip\HttpClient\Adapter' => 'Zend\Http\Client\Adapter\Curl',
),
'factories' => array(
'ZfSnapGeoip\DatabaseConfig' => 'ZfSnapGeoip\DatabaseConfigFactory',
Expand Down
2 changes: 1 addition & 1 deletion src/ZfSnapGeoip/HttpClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class HttpClientFactory implements FactoryInterface
public function createService(ServiceLocatorInterface $serviceLocator)
{
$client = new Client();
$client->setAdapter(new Curl());
$client->setAdapter($serviceLocator->get('ZfSnapGeoip\HttpClient\Adapter'));

return $client;
}
Expand Down

0 comments on commit 875cb60

Please sign in to comment.