You are here

public function Util_TestTest::testGetExpectedRegExp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/tests/Util/TestTest.php \Util_TestTest::testGetExpectedRegExp()

@covers PHPUnit_Util_Test::getExpectedException

File

vendor/phpunit/phpunit/tests/Util/TestTest.php, line 103

Class

Util_TestTest
@since Class available since Release 3.3.6

Code

public function testGetExpectedRegExp() {
  $this
    ->assertArraySubset(array(
    'message_regex' => '#regex#',
  ), PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testWithRegexMessage'));
  $this
    ->assertArraySubset(array(
    'message_regex' => '#regex#',
  ), PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testWithRegexMessageFromClassConstant'));
  $this
    ->assertArraySubset(array(
    'message_regex' => 'ExceptionTest::UNKNOWN_MESSAGE_REGEX_CONSTANT',
  ), PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testWithUnknowRegexMessageFromClassConstant'));
}