Mercurial > hg > isophonics-drupal-site
comparison core/tests/Drupal/FunctionalTests/Bootstrap/ErrorContainer.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 * Container base class which triggers an error. | |
9 */ | |
10 class ErrorContainer extends Container { | |
11 | |
12 /** | |
13 * {@inheritdoc} | |
14 */ | |
15 public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) { | |
16 if ($id === 'http_kernel') { | |
17 // Enforce a recoverable error. | |
18 $callable = function (ErrorContainer $container) { | |
19 }; | |
20 $callable(1); | |
21 } | |
22 else { | |
23 return parent::get($id, $invalidBehavior); | |
24 } | |
25 } | |
26 | |
27 } |