Mercurial > hg > isophonics-drupal-site
view core/tests/Drupal/FunctionalTests/Bootstrap/ErrorContainer.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 129ea1e6d783 |
children |
line wrap: on
line source
<?php namespace Drupal\FunctionalTests\Bootstrap; use Drupal\Core\DependencyInjection\Container; /** * Container base class which triggers an error. */ class ErrorContainer extends Container { /** * {@inheritdoc} */ 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); } } }