last fix for integration tests

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2019-04-10 15:59:29 +02:00
parent 1653985b9d
commit 2675f3f96f
No known key found for this signature in database
GPG key ID: 7424F1874854DF23

View file

@ -217,13 +217,12 @@ class FeatureContext implements Context {
$xml = simplexml_load_string($this->response->getBody());
/** @var array $responseArray */
$responseArray = json_decode(json_encode((array)$xml), true);
foreach($responseArray['data'] as $arrayKey => $arrayValue) {
if(count($responseArray['data'][$arrayKey]) === 0) {
$responseArray['data'][$arrayKey] = '';
}
}
if (count((array)$responseArray['data'][$key]) === 0) {
$responseArray['data'][$key] = '';
}
$actualValue = $responseArray['data'][$key];
if($actualValue !== $value) {
throw new UnexpectedValueException(
sprintf(
@ -242,7 +241,7 @@ class FeatureContext implements Context {
public function aLocalUserWithUidExists($uid) {
shell_exec(
sprintf(
'sudo -u apache OC_PASS=password%s %s user:add %s --display-name "Default displayname of '.$uid.'" --password-from-env',
'sudo -u apache OC_PASS=password %s %s user:add %s --display-name "Default displayname of '.$uid.'" --password-from-env',
PHP_BINARY,
__DIR__ . '/../../../../../../occ',
$uid