Neos\Flow\Http\Client\Browser::getLastResponse PHP Method

getLastResponse() public method

Returns the response received after the last request.
public getLastResponse ( ) : Response
return Neos\Flow\Http\Response The HTTP response or NULL if there wasn't a response yet
    public function getLastResponse()
    {
        return $this->lastResponse;
    }

Usage Example

 /**
  * @test
  */
 public function objectIsNotModifiedAnymoreIfHmacIsRemoved()
 {
     $postIdentifier = $this->setupDummyPost();
     $this->browser->request('http://localhost/test/fluid/formobjects/edit?fooPost=' . $postIdentifier);
     $form = $this->browser->getForm();
     unset($form['__trustedProperties']);
     $this->browser->submit($form);
     $this->assertSame('500 Internal Server Error', $this->browser->getLastResponse()->getStatus());
 }