/** * Test the getLastResponse() method actually returns the last response * */ public function testGetLastResponse() { // First, make sure we get null before the request $this->assertEquals(null, $this->_client->getLastResponse(), 'getLastResponse() is still expected to return null'); // Now, test we get a proper response after the request $this->_client->setUri('http://example.com/foo/bar'); $this->_client->setAdapter('Zend\\Http\\Client\\Adapter\\Test'); $response = $this->_client->send(); $this->assertTrue($response === $this->_client->getResponse(), 'Response is expected to be identical to the result of getResponse()'); }