Commit e536cb07 authored by alexpott's avatar alexpott

Issue #2540538 by znerol: Behavior of testErrorContainer() and...

Issue #2540538 by znerol: Behavior of testErrorContainer() and testExceptionContainer() is unpredictable
parent f8629621
......@@ -18,10 +18,15 @@ class ErrorContainer extends Container {
* {@inheritdoc}
*/
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) {
// Enforce a recoverable error.
$callable = function(ErrorContainer $container) {
};
$callable(1);
if ($id === 'http_kernel') {
// Enforce a recoverable error.
$callable = function(ErrorContainer $container) {
};
$callable(1);
}
else {
return parent::get($id, $invalidBehavior);
}
}
}
......@@ -18,7 +18,12 @@ class ExceptionContainer extends Container {
* {@inheritdoc}
*/
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) {
throw new \Exception('Thrown exception during Container::get');
if ($id === 'http_kernel') {
throw new \Exception('Thrown exception during Container::get');
}
else {
return parent::get($id, $invalidBehavior);
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment