summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-11-17 22:39:34 +0100
committerGitHub <noreply@github.com>2016-11-17 22:39:34 +0100
commitd3900fc0d520e2cc7345beb42e61ec7da6944813 (patch)
treee0a19dcd1dddfe334816f99f5c32317644aa6906 /tests
parent82141faea19090cde11b7f1a1ece10a0a3d79991 (diff)
parentcaacb6c261140cd8f86ba5e430d2d9af217eae45 (diff)
downloadnextcloud-server-d3900fc0d520e2cc7345beb42e61ec7da6944813.tar.gz
nextcloud-server-d3900fc0d520e2cc7345beb42e61ec7da6944813.zip
Merge pull request #2177 from nextcloud/appmanager-getapppath
Expose getAppPath to public API
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/App/ManagerTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/App/ManagerTest.php b/tests/lib/App/ManagerTest.php
index e04f7c82375..3dbcb8a5609 100644
--- a/tests/lib/App/ManagerTest.php
+++ b/tests/lib/App/ManagerTest.php
@@ -11,6 +11,7 @@ namespace Test\App;
use OC\Group\Group;
use OC\User\User;
+use OCP\App\AppPathNotFoundException;
use Test\TestCase;
/**
@@ -260,6 +261,15 @@ class ManagerTest extends TestCase {
$this->assertFalse($this->manager->isEnabledForUser('test', $user));
}
+ public function testGetAppPath() {
+ $this->assertEquals(\OC::$SERVERROOT . '/apps/files', $this->manager->getAppPath('files'));
+ }
+
+ public function testGetAppPathFail() {
+ $this->expectException(AppPathNotFoundException::class);
+ $this->manager->getAppPath('testnotexisting');
+ }
+
public function testIsEnabledForUserEnabledForGroup() {
$user = $this->newUser('user1');
$this->groupManager->expects($this->once())