protected function ExpectDeprecationTrait::addExpectedDeprecationMessage in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Traits/ExpectDeprecationTrait.php \Drupal\Tests\Traits\ExpectDeprecationTrait::addExpectedDeprecationMessage()
Sets an expected deprecation message.
Parameters
string $message: The expected deprecation message.
13 calls to ExpectDeprecationTrait::addExpectedDeprecationMessage()
- ContentEntityBaseUnitTest::testLabel in core/
tests/ Drupal/ Tests/ Core/ Entity/ ContentEntityBaseUnitTest.php - @covers ::label
- ContextAwarePluginBaseTest::testGetContextValue in core/
tests/ Drupal/ KernelTests/ Core/ Plugin/ Context/ ContextAwarePluginBaseTest.php - @covers ::getContextValue @group legacy
- ContextAwarePluginBaseTest::testSetContextValue in core/
tests/ Drupal/ KernelTests/ Core/ Plugin/ Context/ ContextAwarePluginBaseTest.php - @covers ::setContextValue @group legacy
- EntityUnitTest::testLabel in core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityUnitTest.php - @covers ::label @group legacy
- ExpectDeprecationTest::testDeprecatedExpectDeprecation in core/
tests/ Drupal/ Tests/ ExpectDeprecationTest.php - @covers ::expectDeprecation
File
- core/
tests/ Drupal/ Tests/ Traits/ ExpectDeprecationTrait.php, line 28
Class
- ExpectDeprecationTrait
- Adds the ability to dynamically set expected deprecation messages in tests.
Namespace
Drupal\Tests\TraitsCode
protected function addExpectedDeprecationMessage($message) {
$this
->expectedDeprecations([
$message,
]);
}