function ExpectDeprecationTest::testExpectDeprecation
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/ExpectDeprecationTest.php \Drupal\Tests\ExpectDeprecationTest::testExpectDeprecation()
- 10 core/tests/Drupal/Tests/ExpectDeprecationTest.php \Drupal\Tests\ExpectDeprecationTest::testExpectDeprecation()
- 11.x core/tests/Drupal/Tests/ExpectDeprecationTest.php \Drupal\Tests\ExpectDeprecationTest::testExpectDeprecation()
@covers ::addExpectedDeprecationMessage
File
-
core/
tests/ Drupal/ Tests/ ExpectDeprecationTest.php, line 19
Class
- ExpectDeprecationTest
- @coversDefaultClass <a href="/api/drupal/core%21tests%21Drupal%21Tests%21Traits%21ExpectDeprecationTrait.php/trait/ExpectDeprecationTrait/8.9.x" title="Adds the ability to dynamically set expected deprecation messages in tests." class="local">\Drupal\Tests\Traits\ExpectDeprecationTrait</a>
Namespace
Drupal\TestsCode
public function testExpectDeprecation() {
$this->addExpectedDeprecationMessage('Test deprecation');
@trigger_error('Test deprecation', E_USER_DEPRECATED);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.