Better debugging for "Your test case is not allowed to access the database."
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
a8f56ac8c7
commit
97c4c00e3f
1 changed files with 6 additions and 0 deletions
|
@ -66,6 +66,12 @@ class SimpleContainer extends Container implements IContainer {
|
||||||
try {
|
try {
|
||||||
$parameters[] = $this->query($resolveName);
|
$parameters[] = $this->query($resolveName);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
if (class_exists("PHPUnit_Framework_AssertionFailedError") &&
|
||||||
|
$e instanceof \PHPUnit_Framework_AssertionFailedError) {
|
||||||
|
// Easier debugging of "Your test case is not allowed to access the database."
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
// Service not found, use the default value when available
|
// Service not found, use the default value when available
|
||||||
if ($parameter->isDefaultValueAvailable()) {
|
if ($parameter->isDefaultValueAvailable()) {
|
||||||
$parameters[] = $parameter->getDefaultValue();
|
$parameters[] = $parameter->getDefaultValue();
|
||||||
|
|
Loading…
Reference in a new issue