
| Current Path : /var/www/html/rocksensor1/web/core/tests/Drupal/Tests/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor1/web/core/tests/Drupal/Tests/WaitTerminateTestTrait.php |
<?php
declare(strict_types=1);
namespace Drupal\Tests;
/**
* Provides a method to enforce that requests will wait for the terminate event.
*/
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() {
$this->container->get('state')->set('drupal.test_wait_terminate', TRUE);
}
}