only catch QueryException when trying to build class

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2018-09-21 18:32:15 +02:00
parent 0211e17e3f
commit dccbdc8c01
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -66,13 +66,7 @@ class SimpleContainer extends Container implements IContainer {
try {
$parameters[] = $this->query($resolveName);
} catch (\Exception $e) {
if (class_exists('PHPUnit_Framework_AssertionFailedError', false) &&
$e instanceof \PHPUnit_Framework_AssertionFailedError) {
// Easier debugging of "Your test case is not allowed to access the database."
throw $e;
}
} catch (QueryException $e) {
// Service not found, use the default value when available
if ($parameter->isDefaultValueAvailable()) {
$parameters[] = $parameter->getDefaultValue();