I am not worthy

This commit is contained in:
Thibaud Fabre
2015-09-23 15:46:06 +02:00
parent dcbcbb8b39
commit 329cf6ffe7
3 changed files with 8 additions and 3 deletions

View File

@@ -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();
}

View File

@@ -14,6 +14,7 @@
<php>
<ini name="display_errors" value="on"/>
<ini name="memory_limit" value="2G"/>
<const name="API_SKIP_USER_REGISTRATIONS" value="true" />
</php>
<testsuites>

View File

@@ -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;