function BrowserTestBaseTest::testDeprecationTriggeredInSystemUnderTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php \Drupal\FunctionalTests\BrowserTestBaseTest::testDeprecationTriggeredInSystemUnderTest()
Tests deprecation message from deprecated route.
This test verifies that TestHttpClientMiddleware is properly re-throwing deprecations occurred in the SUT and collected in the response header.
Attributes
#[IgnoreDeprecations]
See also
\Drupal\Core\Test\HttpClientMiddleware\TestHttpClientMiddleware
_drupal_error_handler
_drupal_error_handler_real
File
-
core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php, line 621
Class
- BrowserTestBaseTest
- Tests BrowserTestBase functionality.
Namespace
Drupal\FunctionalTestsCode
public function testDeprecationTriggeredInSystemUnderTest() : void {
$this->expectUserDeprecationMessage('This is the deprecation message for deprecation_test_function().');
$this->drupalGet(Url::fromRoute('deprecation_test.route'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.