Sort the array to be sure

This commit is contained in:
Joas Schilling 2015-02-25 16:21:18 +01:00
parent ac5bb97d04
commit fe8df31fa5
1 changed files with 8 additions and 1 deletions

View File

@ -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);
}