public function WebAssert::statusCodeEquals in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/src/WebAssert.php \Behat\Mink\WebAssert::statusCodeEquals()
Checks that current response code equals to provided one.
Parameters
int $code:
Throws
File
- vendor/
behat/ mink/ src/ WebAssert.php, line 125
Class
- WebAssert
- Mink web assertions tool.
Namespace
Behat\MinkCode
public function statusCodeEquals($code) {
$actual = $this->session
->getStatusCode();
$message = sprintf('Current response status code is %d, but %d expected.', $actual, $code);
$this
->assert(intval($code) === intval($actual), $message);
}