public function setUp() { $this->path = __DIR__ . '/TestAsset/responses/'; $this->adapter = new \Zend\Http\Client\Adapter\Test(); $client = new \Zend\Http\Client(null, array('adapter' => $this->adapter)); Client\RestClient::setDefaultHttpClient($client); $this->rest = new Client\RestClient('http://framework.zend.com/'); }
/** * * @return void */ public function setUp() { if (!constant('TESTS_ZEND_SERVICE_DELICIOUS_ENABLED')) { $this->markTestSkipped('\\Zend\\Service\\Delicious online tests are not enabled'); } $httpClient = new Http\Client(); $httpClient->setConfig(array('useragent' => 'Zend\\Service\\Delicious - Unit tests/0.1', 'keepalive' => true)); RestClient\RestClient::setDefaultHttpClient($httpClient); $this->_delicious = new Delicious\Delicious(self::TEST_UNAME, self::TEST_PASS); }