protected function assertPageLoaded($uri, $message = null)
{
$status = $this->response->getStatusCode();
try {
$this->assertEquals(200, $status);
} catch (PHPUnitException $e) {
$message = $message ?: "A request to [{$uri}] failed. Received status code [{$status}].";
$responseException = isset($this->response->exception) ? $this->response->exception : null;
throw new HttpException($message, null, $responseException);
}
return $this;
}