summaryrefslogtreecommitdiffstats
path: root/tests/Settings
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Settings')
-rw-r--r--tests/Settings/Controller/CheckSetupControllerTest.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/Settings/Controller/CheckSetupControllerTest.php b/tests/Settings/Controller/CheckSetupControllerTest.php
index 5bed7e322eb..677a2a0aa0b 100644
--- a/tests/Settings/Controller/CheckSetupControllerTest.php
+++ b/tests/Settings/Controller/CheckSetupControllerTest.php
@@ -629,6 +629,27 @@ class CheckSetupControllerTest extends TestCase {
);
}
+ /**
+ * Calls the check for a none existing app root that is marked as not writable.
+ * It's expected that no error happens since the check shouldn't apply.
+ *
+ * @return void
+ */
+ public function testAppDirectoryOwnersNotWritable() {
+ $tempDir = tempnam(sys_get_temp_dir(), 'apps') . 'dir';
+ OC::$APPSROOTS = [
+ [
+ 'path' => $tempDir,
+ 'url' => '/apps',
+ 'writable' => false,
+ ],
+ ];
+ $this->assertSame(
+ [],
+ $this->invokePrivate($this->checkSetupController, 'getAppDirsWithDifferentOwner')
+ );
+ }
+
public function testIsBuggyNss400() {
$this->config->expects($this->any())
->method('getSystemValue')