function PhpUnitBridgeTest::testSilencedError

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php \Drupal\FunctionalTests\Core\Test\PhpUnitBridgeTest::testSilencedError()
  2. 8.9.x core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php \Drupal\FunctionalTests\Core\Test\PhpUnitBridgeTest::testSilencedError()
  3. 10 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 31

Class

PhpUnitBridgeTest
Tests Drupal's extension to manage code deprecation.

Namespace

Drupal\FunctionalTests\Core\Test

Code

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

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