function ForwardCompatibilityTrait::expectExceptionMessageIsOrContains

Expects an exception message containing a specified string.

Forward compatibility for PHPUnit 13.

Parameters

string $message: The expected exception message.

32 calls to ForwardCompatibilityTrait::expectExceptionMessageIsOrContains()
AddModerationConfigActionTest::testActionOnlyTargetsWorkflows in core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php
Tests that the action only targets workflows.
AddToAllBundlesConfigActionTest::testInstantiateNewFieldOnAllBundles in core/modules/field/tests/src/Kernel/AddToAllBundlesConfigActionTest.php
Tests instantiating a field on all bundles of an entity type.
AllowedValuesConstraintValidatorTest::testValidationCallbackException in core/tests/Drupal/KernelTests/Core/TypedData/AllowedValuesConstraintValidatorTest.php
Tests the AllowedValuesConstraintValidator with an invalid callback.
BrowserTestBaseTest::testError in core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
ComposerInspectorTest::testConfig in core/modules/package_manager/tests/src/Kernel/ComposerInspectorTest.php
Tests config.

... See full list

File

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

Class

ForwardCompatibilityTrait
Provides forward compatibility shim to future PHPUnit versions.

Namespace

Drupal\TestTools\PhpUnitCompatibility

Code

protected function expectExceptionMessageIsOrContains(string $message) : void {
  $this->expectExceptionMessage($message);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.