function ForwardCompatibilityTrait::expectExceptionMessageIs

Expects an exactly matching exception message.

Forward compatibility for PHPUnit 13.

Parameters

string $message: The expected exception message.

541 calls to ForwardCompatibilityTrait::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.

... See full list

File

core/tests/Drupal/TestTools/PhpUnitCompatibility/ForwardCompatibilityTrait.php, line 24

Class

ForwardCompatibilityTrait
Provides forward compatibility shim to future PHPUnit versions.

Namespace

Drupal\TestTools\PhpUnitCompatibility

Code

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.