summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-05-22 18:07:25 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-08-10 00:28:44 +0200
commit59e35e3bf7fc46980bd6d415e1a56c6be81c6899 (patch)
treeb7151ffc796f38576feaafd760a500139399d3ea /build/integration/features/bootstrap
parentb069b132267aee0f34da5bf16c828de66ec518ed (diff)
downloadnextcloud-server-59e35e3bf7fc46980bd6d415e1a56c6be81c6899.tar.gz
nextcloud-server-59e35e3bf7fc46980bd6d415e1a56c6be81c6899.zip
tests for user storage location
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'build/integration/features/bootstrap')
-rw-r--r--build/integration/features/bootstrap/LDAPContext.php23
1 files changed, 15 insertions, 8 deletions
diff --git a/build/integration/features/bootstrap/LDAPContext.php b/build/integration/features/bootstrap/LDAPContext.php
index 5b226753e5c..30e3d1a3d2f 100644
--- a/build/integration/features/bootstrap/LDAPContext.php
+++ b/build/integration/features/bootstrap/LDAPContext.php
@@ -116,14 +116,7 @@ class LDAPContext implements Context {
$userId = array_shift($userResults);
$this->sendingTo('GET', '/cloud/users/' . $userId);
-
- foreach($expectations->getRowsHash() as $k => $v) {
- $value = (string)simplexml_load_string($this->response->getBody())->data[0]->$k;
- PHPUnit_Framework_Assert::assertEquals($v, $value);
- }
-
- $backend = (string)simplexml_load_string($this->response->getBody())->data[0]->backend;
- PHPUnit_Framework_Assert::assertEquals('LDAP', $backend);
+ $this->theRecordFieldsShouldMatch($expectations);
}
/**
@@ -180,6 +173,20 @@ class LDAPContext implements Context {
$uidsFound++;
}
}
+ error_log('result array ' . json_encode($extractedIDsArray)); ## TODO remove debug statement
PHPUnit_Framework_Assert::assertSame((int)$expectedCount, $uidsFound);
}
+
+ /**
+ * @Given /^the record's fields should match$/
+ */
+ public function theRecordFieldsShouldMatch(TableNode $expectations) {
+ foreach($expectations->getRowsHash() as $k => $v) {
+ $value = (string)simplexml_load_string($this->response->getBody())->data[0]->$k;
+ PHPUnit_Framework_Assert::assertEquals($v, $value);
+ }
+
+ $backend = (string)simplexml_load_string($this->response->getBody())->data[0]->backend;
+ PHPUnit_Framework_Assert::assertEquals('LDAP', $backend);
+ }
}