lithium\tests\cases\test\UnitTest::testExceptionCatching PHP Method

testExceptionCatching() public method

    public function testExceptionCatching()
    {
        $test = new MockSkipThrowsExceptionTest();
        $test->run();
        $expected = 'skip throws exception';
        $results = $test->results();
        $this->assertEqual($expected, $results[0]['message']);
        $test = new MockSetUpThrowsExceptionTest();
        $test->run();
        $expected = 'setUp throws exception';
        $results = $test->results();
        $this->assertEqual($expected, $results[0]['message']);
        $test = new MockTearDownThrowsExceptionTest();
        $test->run();
        $expected = 'tearDown throws exception';
        $results = $test->results();
        $this->assertEqual($expected, $results[1]['message']);
    }
UnitTest