public function Framework_TestCaseTest::testExceptionWithRegexpMessage in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php \Framework_TestCaseTest::testExceptionWithRegexpMessage()
File
- vendor/
phpunit/ phpunit/ tests/ Framework/ TestCaseTest.php, line 224
Class
- Framework_TestCaseTest
- @since Class available since Release 2.0.0 @covers PHPUnit_Framework_TestCase
Code
public function testExceptionWithRegexpMessage() {
$test = new ThrowExceptionTestCase('test');
$test
->setExpectedExceptionRegExp('RuntimeException', '/runtime .*? occurred/');
$result = $test
->run();
$this
->assertEquals(1, count($result));
$this
->assertTrue($result
->wasSuccessful());
}