diff --git a/cake/tests/lib/cake_test_case.php b/cake/tests/lib/cake_test_case.php index b242a184a70..153668c106a 100644 --- a/cake/tests/lib/cake_test_case.php +++ b/cake/tests/lib/cake_test_case.php @@ -386,8 +386,12 @@ private function __array_permute($items, $perms = array()) { } } - protected function assertEqual($a, $b) { - return $this->assertEquals($a, $b); + protected function assertEqual($a, $b, $message = '') { + return $this->assertEquals($a, $b, $message); + } + + protected function assertNotEqual($a, $b, $message = '') { + return $this->assertNotEquals($a, $b, $message); } protected function assertPattern($pattern, $string, $message = '') { @@ -404,6 +408,13 @@ protected function assertNoPattern($pattern, $string, $message = '') { protected function assertNoErrors() { } + + protected function expectError($expected = false, $message = '') { + if (!$expected) { + $expected = 'Exception'; + } + $this->setExpectedException($expected, $message); + } protected function expectException($name = null) { $this->setExpectedException($name); diff --git a/cake/tests/lib/reporter/cake_html_reporter.php b/cake/tests/lib/reporter/cake_html_reporter.php index 15954100541..8380adf9e7a 100755 --- a/cake/tests/lib/reporter/cake_html_reporter.php +++ b/cake/tests/lib/reporter/cake_html_reporter.php @@ -257,7 +257,7 @@ public function paintFail($message) { echo "
  • \n"; echo "Failed"; - echo "
    " . $this->_htmlEntities($message->getDescription()) . "
    \n"; + echo "
    " . $this->_htmlEntities($message->toString()) . "
    \n"; echo "
    " . sprintf(__('File: %s'), $context['file']) . "
    \n"; echo "
    " . sprintf(__('Method: %s'), $realContext['function']) . "
    \n"; echo "
    " . sprintf(__('Line: %s'), $context['line']) . "
    \n";