comparison 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
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
1 <?php
2
3 namespace Drupal\FunctionalTests\Bootstrap;
4
5 use Drupal\Core\DependencyInjection\Container;
6
7 /**
8 * Base container which throws an exception.
9 */
10 class ExceptionContainer extends Container {
11
12 /**
13 * {@inheritdoc}
14 */
15 public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) {
16 if ($id === 'http_kernel') {
17 throw new \Exception('Thrown exception during Container::get');
18 }
19 else {
20 return parent::get($id, $invalidBehavior);
21 }
22 }
23
24 }