/** * Checks response code. * * @param $num */ public function seeResponseCodeIs($num) { if (method_exists($this->client->getResponse(), 'getStatusCode')) { \PHPUnit_Framework_Assert::assertEquals($num, $this->client->getResponse()->getStatusCode()); } else { \PHPUnit_Framework_Assert::assertEquals($num, $this->client->getResponse()->getStatus()); } }
/** * @before */ protected function createSession() { $client = new GoutteClient(); $client->setClient(new GuzzleClient(['allow_redirects' => false, 'cookies' => true, 'verify' => false])); $this->session = new Session(new GoutteDriver($client)); }
/** * Checks that response code is not equal to provided value. * * @param $code */ public function dontSeeResponseCodeIs($code) { $this->assertNotEquals($code, $this->client->getInternalResponse()->getStatus()); }