function ExpectDeprecationTest::testExpectDeprecationInIsolation

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/ExpectDeprecationTest.php \Drupal\Tests\ExpectDeprecationTest::testExpectDeprecationInIsolation()
  2. 8.9.x core/tests/Drupal/Tests/ExpectDeprecationTest.php \Drupal\Tests\ExpectDeprecationTest::testExpectDeprecationInIsolation()
  3. 10 core/tests/Drupal/Tests/ExpectDeprecationTest.php \Drupal\Tests\ExpectDeprecationTest::testExpectDeprecationInIsolation()

Tests expectDeprecation in isolated test.

@runInSeparateProcess @preserveGlobalState disabled

File

core/tests/Drupal/Tests/ExpectDeprecationTest.php, line 34

Class

ExpectDeprecationTest
Ensures Drupal has test coverage of Symfony's deprecation testing.

Namespace

Drupal\Tests

Code

public function testExpectDeprecationInIsolation() : void {
    $this->expectDeprecation('Test isolated deprecation');
    // phpcs:ignore Drupal.Semantics.FunctionTriggerError
    @trigger_error('Test isolated deprecation', E_USER_DEPRECATED);
}

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