diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php
index eabe4f12aa..5203c014c3 100644
--- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php
+++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php
@@ -2325,10 +2325,15 @@ class V1Controller extends Controller
{
$ret = [
"user" => $this->listUser($this->getAuthenticatedUser()),
- "collections" => $this->listUserCollections($this->getAuthenticatedUser()),
- "demands" => $this->listUserDemands($this->getAuthenticatedUser())
+ "collections" => $this->listUserCollections($this->getAuthenticatedUser())
];
+ if (! constant('API_SKIP_USER_REGISTRATIONS')) {
+ // I am infinitely sorry... if you feel like it, you can fix the tests database bootstrapping
+ // to use SQLite in all cases and remove this check. Good luck...
+ $ret["demands"] = $this->listUserDemands($this->getAuthenticatedUser());
+ }
+
return Result::create($request, $ret)->createResponse();
}
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 16ddea2dc4..4c13095589 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -14,6 +14,7 @@
+
diff --git a/tests/classes/PhraseanetTestCase.php b/tests/classes/PhraseanetTestCase.php
index d7cb0e818e..53a449e162 100644
--- a/tests/classes/PhraseanetTestCase.php
+++ b/tests/classes/PhraseanetTestCase.php
@@ -30,7 +30,6 @@ abstract class PhraseanetTestCase extends WebTestCase
const USER_AGENT_IE6 = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)';
const USER_AGENT_IPHONE = 'Mozilla/5.0 (iPod; U; CPU iPhone OS 2_1 like Mac OS X; fr-fr) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5F137 Safari/525.20';
-
protected static $DI;
private static $recordsInitialized = false;