You are here

public function ExpectDeprecationTest::testExpectDeprecation in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/ExpectDeprecationTest.php \Drupal\Tests\ExpectDeprecationTest::testExpectDeprecation()

@covers ::addExpectedDeprecationMessage

File

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

Class

ExpectDeprecationTest
@coversDefaultClass \Drupal\Tests\Traits\ExpectDeprecationTrait

Namespace

Drupal\Tests

Code

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