diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-06-05 15:21:53 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-06-05 15:21:53 +0200 |
commit | d493c0c9aca4f1286084798f293b3097b16e9d0e (patch) | |
tree | 8b97fffbc805de6dd707e2a1f2cb8b640ef06c82 /tests | |
parent | 4b1896712901ee0c4e71a25c8e1dd3dc18d63c46 (diff) | |
download | nextcloud-server-d493c0c9aca4f1286084798f293b3097b16e9d0e.tar.gz nextcloud-server-d493c0c9aca4f1286084798f293b3097b16e9d0e.zip |
Sort the result before comparing
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/preferences.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/lib/preferences.php b/tests/lib/preferences.php index a4259a8f349..93c9704f6c6 100644 --- a/tests/lib/preferences.php +++ b/tests/lib/preferences.php @@ -230,7 +230,9 @@ class Test_Preferences_Object extends PHPUnit_Framework_TestCase { $query->execute(array('AUser', 'testGetUsersForValue', 'somekey', 'somevalue')); $preferences = new OC\Preferences(\OC_DB::getConnection()); - $this->assertEquals(array('SomeUser', 'AUser'), $preferences->getUsersForValue('testGetUsersForValue', 'somekey', 'somevalue')); + $result = $preferences->getUsersForValue('testGetUsersForValue', 'somekey', 'somevalue'); + sort($result); + $this->assertEquals(array('AUser', 'SomeUser'), $result); // Clean DB after the test $query = \OC_DB::prepare('DELETE FROM `*PREFIX*preferences` WHERE `appid` = ?'); |