summaryrefslogtreecommitdiffstats
path: root/tests/lib/app.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/app.php')
-rw-r--r--tests/lib/app.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib/app.php b/tests/lib/app.php
index 52eade90a6e..49f40f089bb 100644
--- a/tests/lib/app.php
+++ b/tests/lib/app.php
@@ -79,4 +79,17 @@ class Test_App extends PHPUnit_Framework_TestCase {
$this->assertFalse(OC_App::isAppVersionCompatible($oc, $app));
}
+ /**
+ * Tests that the app order is correct
+ */
+ public function testGetEnabledAppsIsSorted() {
+ $apps = \OC_App::getEnabledApps(true);
+ // copy array
+ $sortedApps = $apps;
+ sort($sortedApps);
+ // 'files' is always on top
+ unset($sortedApps[array_search('files', $sortedApps)]);
+ array_unshift($sortedApps, 'files');
+ $this->assertEquals($sortedApps, $apps);
+ }
}