Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-02-25 18:21:18 +0300
committerJoas Schilling <nickvergessen@gmx.de>2015-02-26 11:13:09 +0300
commitfe8df31fa5cb075b4a07108cb7b30bc515d1bb46 (patch)
treef55ef9ae5a07c2a38a59b3cb0ea25e5f6fa114cd /apps/provisioning_api
parentac5bb97d043c662621cb56ea3fc95a980ddf5564 (diff)
Sort the array to be sure
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r--apps/provisioning_api/tests/groupstest.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/provisioning_api/tests/groupstest.php b/apps/provisioning_api/tests/groupstest.php
index 7b6e1333c2a..3ce05b97ae7 100644
--- a/apps/provisioning_api/tests/groupstest.php
+++ b/apps/provisioning_api/tests/groupstest.php
@@ -59,7 +59,14 @@ class GroupsTest extends TestCase {
$this->assertInstanceOf('OC_OCS_Result', $result);
$this->assertTrue($result->succeeded());
- $this->assertEquals(array('users' => $users), $result->getData());
+ $this->assertEquals(1, sizeof($result->getData()), 'Asserting the result data array only has the "users" key');
+ $this->assertArrayHasKey('users', $result->getData());
+ $resultData = $result->getData();
+ $resultData = $resultData['users'];
+
+ sort($users);
+ sort($resultData);
+ $this->assertEquals($users, $resultData);
}