function TestSubscriber::setExit
Sets whether a specific event will call exit().
This is useful for simulating an unrecoverable (fatal) error when handling the given event.
Parameters
string $event: The event class.
File
-
core/
modules/ package_manager/ tests/ modules/ package_manager_test_validation/ src/ EventSubscriber/ TestSubscriber.php, line 56
Class
- TestSubscriber
- Defines an event subscriber for testing validation of Package Manager events.
Namespace
Drupal\package_manager_test_validation\EventSubscriberCode
public static function setExit(string $event) : void {
\Drupal::state()->set(self::getStateKey($event), 'exit');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.