diff options
Diffstat (limited to 'tests/lib/preferences-singleton.php')
-rw-r--r-- | tests/lib/preferences-singleton.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/lib/preferences-singleton.php b/tests/lib/preferences-singleton.php index 17fe54ad1f5..2fde089263c 100644 --- a/tests/lib/preferences-singleton.php +++ b/tests/lib/preferences-singleton.php @@ -44,7 +44,10 @@ class Test_Preferences extends PHPUnit_Framework_TestCase { $expected[] = $row['userid']; } - $this->assertEquals($expected, \OC_Preferences::getUsers()); + sort($expected); + $users = \OC_Preferences::getUsers(); + sort($users); + $this->assertEquals($expected, $users); } public function testGetApps() { @@ -55,8 +58,10 @@ class Test_Preferences extends PHPUnit_Framework_TestCase { $expected[] = $row['appid']; } - $this->assertEquals($expected, \OC_Preferences::getApps('Someuser')); - } + sort($expected); + $apps = \OC_Preferences::getApps('Someuser'); + sort($apps); + $this->assertEquals($expected, $apps); } public function testGetKeys() { $query = \OC_DB::prepare('SELECT DISTINCT `configkey` FROM `*PREFIX*preferences` WHERE `userid` = ? AND `appid` = ?'); @@ -66,7 +71,10 @@ class Test_Preferences extends PHPUnit_Framework_TestCase { $expected[] = $row['configkey']; } - $this->assertEquals($expected, \OC_Preferences::getKeys('Someuser', 'getkeysapp')); + sort($expected); + $keys = \OC_Preferences::getKeys('Someuser', 'getkeysapp'); + sort($keys); + $this->assertEquals($expected, $keys); } public function testGetValue() { |