markTestSkipped('Curl not available, skipping Curl adapter tests'); } $this->_adapter = new Solarium_Client_Adapter_Curl(); } public function testCheck() { $data = 'data'; $headers = array('X-dummy: data'); // this should be ok, no exception $this->_adapter->check($data, $headers); $data = ''; $headers = array(); $this->setExpectedException('Solarium_Exception'); $this->_adapter->check($data, $headers); } public function testExecute() { $headers = array('HTTP/1.0 200 OK'); $body = 'data'; $data = array($body, $headers); $request = new Solarium_Client_Request(); $mock = $this->getMock('Solarium_Client_Adapter_Curl', array('_getData')); $mock->expects($this->once()) ->method('_getData') ->with($request) ->will($this->returnValue($data)); $response = $mock->execute($request); $this->assertEquals($data, $response); } }