Commit cfc8f6cc authored by Bas de Nooijer's avatar Bas de Nooijer

Some small bugfixes for namespacing

parent 9c4aecf5
......@@ -67,7 +67,7 @@ class ZendHttp extends Adapter
* Set options
*
* Overrides any existing values.
*
*
* If the options array has an 'options' entry it is forwarded to the
* Zend_Http_Client. See the Zend_Http_Clientdocs for the many config
* options available.
......@@ -93,7 +93,7 @@ class ZendHttp extends Adapter
if (isset($this->_options['options'])) {
$adapterOptions = array_merge($adapterOptions, $this->_options['options']);
}
$this->_zendHttp->setConfig($adapterOptions);
}
......@@ -141,7 +141,7 @@ class ZendHttp extends Adapter
);
}
$this->_zendHttp = new \Zend\Http\Client(null, $options);
$this->_zendHttp = new \Zend_Http_Client(null, $options);
}
return $this->_zendHttp;
......
......@@ -487,7 +487,7 @@ class Loadbalancer extends Solarium\Plugin\AbstractPlugin
$adapter->setOptions($options);
try {
return $adapter->execute($request);
} catch(olarium\Client\HttpException $e) {
} catch(\Solarium\Client\HttpException $e) {
// ignore HTTP errors and try again
// but do issue an event for things like logging
$e = new \Solarium\Exception('Maximum number of loadbalancer retries reached');
......
......@@ -40,11 +40,11 @@ class ZendHttpTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
if (!class_exists('Zend_Loader_Autoloader') && (@include_once 'Zend/Loader/Autoloader.php') !== 'OK') {
if (!class_exists('Zend_Loader_Autoloader') && !(@include_once 'Zend/Loader/Autoloader.php')) {
$this->markTestSkipped('ZF not in include_path, skipping ZendHttp adapter tests');
}
Zend_Loader_Autoloader::getInstance();
\Zend_Loader_Autoloader::getInstance();
$this->_adapter = new \Solarium\Client\Adapter\ZendHttp();
}
......@@ -53,7 +53,7 @@ class ZendHttpTest extends \PHPUnit_Framework_TestCase
{
$options = array('timeout' => 10, 'optionZ' => 123, 'options' => array('optionX' => 'Y'));
$adapterOptions = array('timeout' => 10, 'optionX' => 'Y');
$mock = $this->getMock('Zend_Http_Client');
$mock->expects($this->once())
->method('setConfig')
......@@ -100,7 +100,7 @@ class ZendHttpTest extends \PHPUnit_Framework_TestCase
$request->setHeaders($headers);
$request->setRawData($rawData);
$response = new Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), $responseData);
$response = new \Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), $responseData);
$mock = $this->getMock('Zend_Http_Client');
$mock->expects($this->once())
......@@ -131,7 +131,7 @@ class ZendHttpTest extends \PHPUnit_Framework_TestCase
public function testExecuteErrorResponse()
{
$request = new \Solarium\Client\Request();
$response = new Zend_Http_Response(404, array(), '');
$response = new \Zend_Http_Response(404, array(), '');
$mock = $this->getMock('Zend_Http_Client');
$mock->expects($this->once())
......@@ -149,7 +149,7 @@ class ZendHttpTest extends \PHPUnit_Framework_TestCase
{
$request = new \Solarium\Client\Request();
$request->setMethod(\Solarium\Client\Request::METHOD_HEAD);
$response = new Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), 'data');
$response = new \Zend_Http_Response(200, array('status' => 'HTTP 1.1 200 OK'), 'data');
$mock = $this->getMock('Zend_Http_Client');
$mock->expects($this->once())
......
......@@ -425,7 +425,7 @@ class LoadbalancerTest extends \PHPUnit_Framework_TestCase
$query = new \Solarium\Query\Select\Select();
$this->_plugin->preCreateRequest($query);
$this->setExpectedException('Solarium\Exception', 'Maximum number of loadbalancer retries reached');
$this->setExpectedException('\Solarium\Exception', 'Maximum number of loadbalancer retries reached');
$this->_plugin->preExecuteRequest($request);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment