function testMessage() { try { Controller::Redirect('/some/path.html'); $this->fail('Редирект выбрасывает исключение'); } catch (\CMSx\Controller\Exception $e) { $m = Exception::GetHTTPInfo($e->getCode(), true); $s = Exception::GetHTTPInfo($e->getCode()); $h = 'HTTP/1.0 ' . $e->getCode() . ' ' . $s; $this->assertNotEmpty($m, 'Текст ошибки есть'); $this->assertNotEmpty($s, 'Статус ошибки есть'); $this->assertEquals($m, $e->getHumanMessage(), 'Текст ошибки для человеков'); $this->assertEquals($s, $e->getHTTPStatus(), 'HTTP Status для роботов'); $this->assertEquals($h, $e->getHTTPHeader(), 'Сформированный HTTP Header'); } }