You are here

public function PhpUnitBridgeTest::testSilencedError in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php \Drupal\FunctionalTests\Core\Test\PhpUnitBridgeTest::testSilencedError()
  2. 9 core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php \Drupal\FunctionalTests\Core\Test\PhpUnitBridgeTest::testSilencedError()

Tests deprecation message from deprecation_test_function().

File

core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php, line 26

Class

PhpUnitBridgeTest
Tests Drupal's integration with Symfony PHPUnit Bridge.

Namespace

Drupal\FunctionalTests\Core\Test

Code

public function testSilencedError() {
  $this
    ->expectDeprecation('This is the deprecation message for deprecation_test_function().');
  $this
    ->assertEquals('known_return_value', deprecation_test_function());
}