From 285a56bd82f08952f659319c93751e3b48bbc366 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 25 Jun 2021 22:07:33 +0200 Subject: fix provisioning test check Signed-off-by: Arthur Schiwon --- build/integration/features/bootstrap/Provisioning.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'build') diff --git a/build/integration/features/bootstrap/Provisioning.php b/build/integration/features/bootstrap/Provisioning.php index 3cc1366c52c..ad22925eddf 100644 --- a/build/integration/features/bootstrap/Provisioning.php +++ b/build/integration/features/bootstrap/Provisioning.php @@ -168,15 +168,16 @@ trait Provisioning { $response = $client->get($fullUrl, $options); foreach ($settings->getRows() as $setting) { $value = json_decode(json_encode(simplexml_load_string($response->getBody())->data->{$setting[0]}), 1); - if (isset($value[0])) { - if (in_array($setting[0], ['additional_mail', 'additional_mailScope'], true)) { - $expectedValues = explode(';', $setting[1]); - foreach ($expectedValues as $expected) { - Assert::assertTrue(in_array($expected, $value, true)); - } - } else { - Assert::assertEquals($setting[1], $value[0], "", 0.0, 10, true); + if (in_array($setting[0], ['additional_mail', 'additional_mailScope'], true)) { + var_dump($value); + } + if (isset($value['element']) && in_array($setting[0], ['additional_mail', 'additional_mailScope'], true)) { + $expectedValues = explode(';', $setting[1]); + foreach ($expectedValues as $expected) { + Assert::assertTrue(in_array($expected, $value['element'], true)); } + } elseif (isset($value[0])) { + Assert::assertEquals($setting[1], $value[0], "", 0.0, 10, true); } else { Assert::assertEquals('', $setting[1]); } -- cgit v1.2.3