function ExpectDeprecationTest::testExpectDeprecationInIsolation

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

@covers ::addExpectedDeprecationMessage @runInSeparateProcess @preserveGlobalState disabled

File

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

Class

ExpectDeprecationTest
@coversDefaultClass \Drupal\Tests\Traits\ExpectDeprecationTrait

Namespace

Drupal\Tests

Code

public function testExpectDeprecationInIsolation() {
    $this->addExpectedDeprecationMessage('Test isolated deprecation');
    $this->addExpectedDeprecationMessage('Test isolated deprecation2');
    @trigger_error('Test isolated deprecation', E_USER_DEPRECATED);
    @trigger_error('Test isolated deprecation2', E_USER_DEPRECATED);
}

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