summaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Storage/LocalTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/Storage/LocalTest.php')
-rw-r--r--tests/lib/Files/Storage/LocalTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/Files/Storage/LocalTest.php b/tests/lib/Files/Storage/LocalTest.php
index e324d2b28db..1190a2b2da0 100644
--- a/tests/lib/Files/Storage/LocalTest.php
+++ b/tests/lib/Files/Storage/LocalTest.php
@@ -139,4 +139,15 @@ class LocalTest extends Storage {
umask($oldMask);
$this->assertTrue($this->instance->isUpdatable('test.txt'));
}
+
+ public function testUnavailableExternal() {
+ $this->expectException(\OCP\Files\StorageNotAvailableException::class);
+ $this->instance = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir . '/unexist', 'isExternal' => true]);
+ }
+
+ public function testUnavailableNonExternal() {
+ $this->instance = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir . '/unexist']);
+ // no exception thrown
+ $this->assertNotNull($this->instance);
+ }
}