aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-03-05 16:06:29 +0100
committerJoas Schilling <coding@schilljs.com>2018-03-05 16:06:29 +0100
commit97c4c00e3f3e1bc9561953fb110b83c11eda1d2c (patch)
tree63e60a3f21a77cf27e4d2c0924767f000b2b2cca /lib
parenta8f56ac8c71aa7854d2018f294eeb2e7e3e4d2eb (diff)
downloadnextcloud-server-97c4c00e3f3e1bc9561953fb110b83c11eda1d2c.tar.gz
nextcloud-server-97c4c00e3f3e1bc9561953fb110b83c11eda1d2c.zip
Better debugging for "Your test case is not allowed to access the database."
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AppFramework/Utility/SimpleContainer.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index b86d3339264..97cb772e3bb 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -66,6 +66,12 @@ class SimpleContainer extends Container implements IContainer {
try {
$parameters[] = $this->query($resolveName);
} 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
if ($parameter->isDefaultValueAvailable()) {
$parameters[] = $parameter->getDefaultValue();