diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-02-25 16:21:18 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-02-26 09:13:09 +0100 |
commit | fe8df31fa5cb075b4a07108cb7b30bc515d1bb46 (patch) | |
tree | f55ef9ae5a07c2a38a59b3cb0ea25e5f6fa114cd | |
parent | ac5bb97d043c662621cb56ea3fc95a980ddf5564 (diff) | |
download | nextcloud-server-fe8df31fa5cb075b4a07108cb7b30bc515d1bb46.tar.gz nextcloud-server-fe8df31fa5cb075b4a07108cb7b30bc515d1bb46.zip |
Sort the array to be sure
-rw-r--r-- | apps/provisioning_api/tests/groupstest.php | 9 |
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); } |