Sort the array to be sure
This commit is contained in:
parent
ac5bb97d04
commit
fe8df31fa5
|
@ -59,7 +59,14 @@ class GroupsTest extends TestCase {
|
||||||
|
|
||||||
$this->assertInstanceOf('OC_OCS_Result', $result);
|
$this->assertInstanceOf('OC_OCS_Result', $result);
|
||||||
$this->assertTrue($result->succeeded());
|
$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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue