protected function PHPUnit_Framework_TestCase::setExpectedExceptionFromAnnotation in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Framework/TestCase.php \PHPUnit_Framework_TestCase::setExpectedExceptionFromAnnotation()
@since Method available since Release 3.4.0
1 call to PHPUnit_Framework_TestCase::setExpectedExceptionFromAnnotation()
- PHPUnit_Framework_TestCase::runBare in vendor/
phpunit/ phpunit/ src/ Framework/ TestCase.php - Runs the bare test sequence.
File
- vendor/
phpunit/ phpunit/ src/ Framework/ TestCase.php, line 473
Class
- PHPUnit_Framework_TestCase
- A TestCase defines the fixture to run multiple tests.
Code
protected function setExpectedExceptionFromAnnotation() {
try {
$expectedException = PHPUnit_Util_Test::getExpectedException(get_class($this), $this->name);
if ($expectedException !== false) {
$this
->setExpectedException($expectedException['class'], $expectedException['message'], $expectedException['code']);
if (!empty($expectedException['message_regex'])) {
$this
->setExpectedExceptionRegExp($expectedException['class'], $expectedException['message_regex'], $expectedException['code']);
}
}
} catch (ReflectionException $e) {
}
}