You are here

public function Framework_TestCaseTest::testExceptionWithInvalidRegexpMessage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php \Framework_TestCaseTest::testExceptionWithInvalidRegexpMessage()

@covers PHPUnit_Framework_Constraint_ExceptionMessageRegExp

File

vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php, line 253

Class

Framework_TestCaseTest
@since Class available since Release 2.0.0 @covers PHPUnit_Framework_TestCase

Code

public function testExceptionWithInvalidRegexpMessage() {
  $test = new ThrowExceptionTestCase('test');
  $test
    ->setExpectedExceptionRegExp('RuntimeException', '#runtime .*? occurred/');

  // wrong delimiter
  $result = $test
    ->run();
  $this
    ->assertEquals("Invalid expected exception message regex given: '#runtime .*? occurred/'", $test
    ->getStatusMessage());
}