public function ErrorContainer::get in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalTests/Bootstrap/ErrorContainer.php \Drupal\FunctionalTests\Bootstrap\ErrorContainer::get()
Overrides Container::get
File
- core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ ErrorContainer.php, line 15
Class
- ErrorContainer
- Container base class which triggers an error.
Namespace
Drupal\FunctionalTests\BootstrapCode
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) {
if ($id === 'http_kernel') {
// Enforce a recoverable error.
$callable = function (ErrorContainer $container) {
};
$callable(1);
}
else {
return parent::get($id, $invalidBehavior);
}
}