diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-02-25 18:21:18 +0300 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-02-26 11:13:09 +0300 |
commit | fe8df31fa5cb075b4a07108cb7b30bc515d1bb46 (patch) | |
tree | f55ef9ae5a07c2a38a59b3cb0ea25e5f6fa114cd /apps/provisioning_api | |
parent | ac5bb97d043c662621cb56ea3fc95a980ddf5564 (diff) |
Sort the array to be sure
Diffstat (limited to 'apps/provisioning_api')
-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); } |