Commit 149258eb authored by Bas de Nooijer's avatar Bas de Nooijer

Merge branch 'develop' into feature/nextgen

Conflicts:
	tests/Solarium/Tests/Client/Adapter/PeclHttpTest.php
parents 806a1ec0 c574e8c0
...@@ -64,36 +64,39 @@ class PeclHttpTest extends \PHPUnit_Framework_TestCase ...@@ -64,36 +64,39 @@ class PeclHttpTest extends \PHPUnit_Framework_TestCase
public function requestProvider() public function requestProvider()
{ {
$methods = array( // prevents undefined constants errors
\Solarium\Client\Request::METHOD_GET => array( if (function_exists('http_get')) {
'method' => HTTP_METH_GET, $methods = array(
'support' => true \Solarium\Client\Request::METHOD_GET => array(
), 'method' => HTTP_METH_GET,
\Solarium\Client\Request::METHOD_POST => array( 'support' => true
'method' => HTTP_METH_POST, ),
'support' => true \Solarium\Client\Request::METHOD_POST => array(
), 'method' => HTTP_METH_POST,
\Solarium\Client\Request::METHOD_HEAD => array( 'support' => true
'method' => HTTP_METH_HEAD, ),
'support' => true \Solarium\Client\Request::METHOD_HEAD => array(
), 'method' => HTTP_METH_HEAD,
'PUT' => array( 'support' => true
'method' => HTTP_METH_PUT, ),
'support' => false 'PUT' => array(
), 'method' => HTTP_METH_PUT,
'DELETE' => array( 'support' => false
'method' => HTTP_METH_DELETE, ),
'support' => false 'DELETE' => array(
), 'method' => HTTP_METH_DELETE,
); 'support' => false
),
foreach ($methods as $method => $options) { );
$request = new \Solarium\Client\Request;
$request->setMethod($method); foreach ($methods as $method => $options) {
$data[] = array_merge(array($request), $options); $request = new \Solarium\Client\Request;
} $request->setMethod($method);
$data[] = array_merge(array($request), $options);
}
return $data; return $data;
}
} }
public function testToHttpRequestWithHeaders() public function testToHttpRequestWithHeaders()
......
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