summaryrefslogtreecommitdiffstats
path: root/build/integration/features
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-04-09 12:27:36 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-08-09 23:45:10 +0200
commitb4eeb9eff5b2892fc9c1da5f56fb1129730d07a6 (patch)
tree99a7f96d07cc6ac3515266be4cc37c27fe9f7135 /build/integration/features
parent86d145f0692df7b6d5883c6caa88c19b7d725161 (diff)
downloadnextcloud-server-b4eeb9eff5b2892fc9c1da5f56fb1129730d07a6.tar.gz
nextcloud-server-b4eeb9eff5b2892fc9c1da5f56fb1129730d07a6.zip
check user details
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'build/integration/features')
-rw-r--r--build/integration/features/bootstrap/LDAPContext.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/LDAPContext.php b/build/integration/features/bootstrap/LDAPContext.php
index 5d7bb34a90a..b1ccd59ab7b 100644
--- a/build/integration/features/bootstrap/LDAPContext.php
+++ b/build/integration/features/bootstrap/LDAPContext.php
@@ -104,4 +104,24 @@ class LDAPContext implements Context {
$this->settingTheLDAPConfigurationTo($data);
$this->asAn('');
}
+
+ /**
+ * @Given /^looking up details for the first result matches expectations$/
+ * @param TableNode $expectations
+ */
+ public function lookingUpDetailsForTheFirstResult(TableNode $expectations) {
+ $userResultElements = simplexml_load_string($this->response->getBody())->data[0]->users[0]->element;
+ $userResults = json_decode(json_encode($userResultElements), 1);
+ $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);
+ }
}