getLastRequest() public method

public getLastRequest ( ) : Request | null
return Request | null
コード例 #1
0
 public function testLastRequestResponse()
 {
     $client = new Client();
     $response = $client->request('_status');
     $this->assertInstanceOf('Elastica\\Response', $response);
     $lastRequest = $client->getLastRequest();
     $this->assertInstanceOf('Elastica\\Request', $lastRequest);
     $this->assertEquals('_status', $lastRequest->getPath());
     $lastResponse = $client->getLastResponse();
     $this->assertInstanceOf('Elastica\\Response', $lastResponse);
     $this->assertSame($response, $lastResponse);
 }