Commit 076c0c87 authored by Bas de Nooijer's avatar Bas de Nooijer

updated unittests for code changes

parent a90167e1
......@@ -38,12 +38,12 @@ class Solarium_Client_RequestBuilder_PingTest extends PHPUnit_Framework_TestCase
$request = $builder->build(new Solarium_Query_Ping);
$this->assertEquals(
'admin/ping?',
'admin/ping?wt=json',
$request->getUri()
);
$this->assertEquals(
Solarium_Client_Request::METHOD_HEAD,
Solarium_Client_Request::METHOD_GET,
$request->getMethod()
);
}
......
......@@ -68,9 +68,12 @@ class Solarium_Client_ResponseParser_Select_Component_FacetSetTest extends PHPUn
'after' => 5,
'between' => 4,
'counts' => array(
'1.0' => 1,
'101.0' => 2,
'201.0' => 1,
'1.0',
1,
'101.0',
2,
'201.0',
1,
)
)
)
......@@ -136,7 +139,7 @@ class Solarium_Client_ResponseParser_Select_Component_FacetSetTest extends PHPUn
$this->_facetSet->addFacet($facetStub);
$this->setExpectedException('Solarium_Exception');
$this->setExpectedException('Solarium_Exception');
$this->_parser->parse(null, $this->_facetSet, array());
}
......
......@@ -34,11 +34,15 @@ class Solarium_Result_PingTest extends PHPUnit_Framework_TestCase
public function testGetStatus()
{
$ping = new Solarium_Result_Ping();
$client = new Solarium_Client;
$query = new Solarium_Query_Ping;
$response = new Solarium_Client_Response('{"responseHeader":{"status":1,"QTime":12}}',array('HTTP 1.1 200 OK'));
$ping = new Solarium_Result_Ping($client, $query, $response);
$this->assertEquals(
0,
$ping->getStatus()
);
}
}
\ No newline at end of file
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