diff options
Diffstat (limited to 'build/integration/features/bootstrap/LDAPContext.php')
-rw-r--r-- | build/integration/features/bootstrap/LDAPContext.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/build/integration/features/bootstrap/LDAPContext.php b/build/integration/features/bootstrap/LDAPContext.php index 306b1e3c517..4217bc640c9 100644 --- a/build/integration/features/bootstrap/LDAPContext.php +++ b/build/integration/features/bootstrap/LDAPContext.php @@ -38,7 +38,7 @@ class LDAPContext implements Context { /** @AfterScenario */ public function teardown() { - if($this->configID === null) { + if ($this->configID === null) { return; } $this->disableLDAPConfiguration(); # via occ in case of big config issues @@ -140,7 +140,7 @@ class LDAPContext implements Context { $originalAsAn = $this->currentUser; $this->asAn('admin'); $configData = $table->getRows(); - foreach($configData as &$row) { + foreach ($configData as &$row) { $row[0] = 'configData[' . $row[0] . ']'; } $this->settingTheLDAPConfigurationTo(new TableNode($configData)); @@ -153,8 +153,8 @@ class LDAPContext implements Context { public function theGroupResultShouldMatch(string $type, TableNode $expectations) { $listReturnedElements = simplexml_load_string($this->response->getBody())->data[0]->$type[0]->element; $extractedIDsArray = json_decode(json_encode($listReturnedElements), 1); - foreach($expectations->getRows() as $expectation) { - if((int)$expectation[1] === 1) { + foreach ($expectations->getRows() as $expectation) { + if ((int)$expectation[1] === 1) { Assert::assertContains($expectation[0], $extractedIDsArray); } else { Assert::assertNotContains($expectation[0], $extractedIDsArray); @@ -182,8 +182,8 @@ class LDAPContext implements Context { $listReturnedElements = simplexml_load_string($this->response->getBody())->data[0]->$type[0]->element; $extractedIDsArray = json_decode(json_encode($listReturnedElements), 1); $uidsFound = 0; - foreach($expectations->getRows() as $expectation) { - if(in_array($expectation[0], $extractedIDsArray)) { + foreach ($expectations->getRows() as $expectation) { + if (in_array($expectation[0], $extractedIDsArray)) { $uidsFound++; } } @@ -194,7 +194,7 @@ class LDAPContext implements Context { * @Given /^the record's fields should match$/ */ public function theRecordFieldsShouldMatch(TableNode $expectations) { - foreach($expectations->getRowsHash() as $k => $v) { + foreach ($expectations->getRowsHash() as $k => $v) { $value = (string)simplexml_load_string($this->response->getBody())->data[0]->$k; Assert::assertEquals($v, $value, "got $value"); } |