function DrupalTestCaseTrait::expectExceptionMessageIs
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/DrupalTestCaseTrait.php \Drupal\Tests\DrupalTestCaseTrait::expectExceptionMessageIs()
Expects an exactly matching exception message.
Forward compatibility for PHPUnit 13.
Parameters
string $message: The expected exception message.
519 calls to DrupalTestCaseTrait::expectExceptionMessageIs()
- AcceptHeaderMatcherTest::testNoRouteFound in core/
tests/ Drupal/ Tests/ Core/ Routing/ AcceptHeaderMatcherTest.php - Confirms that the AcceptHeaderMatcher throws an exception for no-route.
- AccessAwareRouterTest::testCheckAccessResultWithReason in core/
tests/ Drupal/ Tests/ Core/ Routing/ AccessAwareRouterTest.php - Tests the matchRequest() function for access denied with reason message.
- AccessPolicyProcessorTest::testMultipleScopeAlterException in core/
tests/ Drupal/ Tests/ Core/ Session/ AccessPolicyProcessorTest.php - Tests the multiple scopes exception.
- AccessPolicyProcessorTest::testMultipleScopeException in core/
tests/ Drupal/ Tests/ Core/ Session/ AccessPolicyProcessorTest.php - Tests the multiple scopes exception.
- AccessPolicyProcessorTest::testWrongScopeException in core/
tests/ Drupal/ Tests/ Core/ Session/ AccessPolicyProcessorTest.php - Tests the wrong scope exception.
File
-
core/
tests/ Drupal/ Tests/ DrupalTestCaseTrait.php, line 78
Class
- DrupalTestCaseTrait
- Provides methods common across Drupal test classes.
Namespace
Drupal\TestsCode
protected function expectExceptionMessageIs(string $message) : void {
$this->expectExceptionMessage($message);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.