summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/files/cache/cache.php5
-rw-r--r--tests/lib/files/view.php3
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib/files/cache/cache.php b/tests/lib/files/cache/cache.php
index e9105cd5abd..a2b131ac0ac 100644
--- a/tests/lib/files/cache/cache.php
+++ b/tests/lib/files/cache/cache.php
@@ -192,6 +192,11 @@ class Cache extends \UnitTestCase {
$this->assertEquals($file3, $this->cache->getIncomplete());
}
+ function testNonExisting() {
+ $this->assertFalse($this->cache->get('foo.txt'));
+ $this->assertEquals(array(), $this->cache->getFolderContents('foo'));
+ }
+
public function tearDown() {
$this->cache->clear();
}
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php
index ed08dcc1148..1b8f6dc1e8c 100644
--- a/tests/lib/files/view.php
+++ b/tests/lib/files/view.php
@@ -92,6 +92,9 @@ class View extends \PHPUnit_Framework_TestCase {
$cachedData = $rootView->getFileInfo('/foo.txt');
$this->assertTrue($cachedData['encrypted']);
$this->assertEquals($cachedData['fileid'], $id);
+
+ $this->assertFalse($rootView->getFileInfo('/non/existing'));
+ $this->assertEquals(array(), $rootView->getDirectoryContent('/non/existing'));
}
public function testAutoScan() {