trait WaitTerminateTestTrait
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/WaitTerminateTestTrait.php \Drupal\Tests\WaitTerminateTestTrait
- 10 core/tests/Drupal/Tests/WaitTerminateTestTrait.php \Drupal\Tests\WaitTerminateTestTrait
Provides a method to enforce that requests will wait for the terminate event.
Hierarchy
- trait \Drupal\Tests\WaitTerminateTestTrait
9 files declare their use of WaitTerminateTestTrait
- ConfigurableLanguageManagerTest.php in core/
modules/ language/ tests/ src/ Functional/ ConfigurableLanguageManagerTest.php - CronRunTest.php in core/
modules/ system/ tests/ src/ Functional/ System/ CronRunTest.php - DisplayFeedTranslationTest.php in core/
modules/ views/ tests/ src/ Functional/ Plugin/ DisplayFeedTranslationTest.php - JsonApiFunctionalTest.php in core/
modules/ jsonapi/ tests/ src/ Functional/ JsonApiFunctionalTest.php - LocaleLocaleLookupTest.php in core/
modules/ locale/ tests/ src/ Functional/ LocaleLocaleLookupTest.php
File
-
core/
tests/ Drupal/ Tests/ WaitTerminateTestTrait.php, line 10
Namespace
Drupal\TestsView source
trait WaitTerminateTestTrait {
/**
* Specify that subsequent requests must wait for the terminate event.
*
* The terminate event is fired after a response is sent to the user agent.
* Tests with assertions which operate on data computed during the terminate
* event need to enable this.
*/
protected function setWaitForTerminate() : void {
$this->setContainerParameter('drupal.test_wait_terminate', TRUE);
$this->rebuildContainer();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.