summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-02-25 16:21:18 +0100
committerJoas Schilling <nickvergessen@gmx.de>2015-02-26 09:13:09 +0100
commitfe8df31fa5cb075b4a07108cb7b30bc515d1bb46 (patch)
treef55ef9ae5a07c2a38a59b3cb0ea25e5f6fa114cd
parentac5bb97d043c662621cb56ea3fc95a980ddf5564 (diff)
downloadnextcloud-server-fe8df31fa5cb075b4a07108cb7b30bc515d1bb46.tar.gz
nextcloud-server-fe8df31fa5cb075b4a07108cb7b30bc515d1bb46.zip
Sort the array to be sure
-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);
}