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

testExpectExceptionRegex() public method

    public function testExpectExceptionRegex()
    {
        $test = $this->test;
        $this->assertException('/deprecated/', function () use($test) {
            $test->expectException('/test handle exception/');
        });
        $this->test->handleException(new Exception('test handle exception'));
        $this->assertEmpty($this->test->expected());
    }
UnitTest