Mercurial > hg > isophonics-drupal-site
view core/tests/Drupal/FunctionalTests/Bootstrap/ExceptionContainer.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | |
children |
line wrap: on
line source
<?php namespace Drupal\FunctionalTests\Bootstrap; use Drupal\Core\DependencyInjection\Container; /** * Base container which throws an exception. */ class ExceptionContainer extends Container { /** * {@inheritdoc} */ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) { if ($id === 'http_kernel') { throw new \Exception('Thrown exception during Container::get'); } else { return parent::get($id, $invalidBehavior); } } }