public function assertResponseCode($expected)
{
// convert to string if int
if (is_integer($expected)) {
$expected = (string) $expected;
}
$actualValue = $this->di->getShared('response')->getHeaders()->get('Status');
if (empty($actualValue) || stristr($actualValue, $expected) === false) {
throw new \PHPUnit_Framework_ExpectationFailedException(sprintf('Failed asserting response code is "%s", actual response status is "%s"', $expected, $actualValue));
}
$this->assertContains($expected, $actualValue);
}