summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-06-20 10:47:37 +0200
committerThomas Mueller <thomas.mueller@tmit.eu>2013-06-20 10:47:37 +0200
commit5d0a3f981c1be8f9a0fd42f3172acf89259739a2 (patch)
tree305ebf5bbdeba29c0c0a85a93ae1a84d9e269186 /tests
parentc1a3f015c9f5d7b0753d1cdb01c8b648233e66b8 (diff)
downloadnextcloud-server-5d0a3f981c1be8f9a0fd42f3172acf89259739a2.tar.gz
nextcloud-server-5d0a3f981c1be8f9a0fd42f3172acf89259739a2.zip
adding unit test for folder remove: testRemovedFolder()
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/cache/scanner.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/files/cache/scanner.php b/tests/lib/files/cache/scanner.php
index 3ee7f099f38..e93c51441b1 100644
--- a/tests/lib/files/cache/scanner.php
+++ b/tests/lib/files/cache/scanner.php
@@ -154,6 +154,17 @@ class Scanner extends \PHPUnit_Framework_TestCase {
$this->assertFalse($this->cache->inCache('foo.txt'));
}
+ public function testRemovedFolder() {
+ $this->fillTestFolders();
+
+ $this->scanner->scan('');
+ $this->assertTrue($this->cache->inCache('folder/bar.txt'));
+ $this->storage->unlink('/folder');
+ $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW);
+ $this->assertFalse($this->cache->inCache('folder'));
+ $this->assertFalse($this->cache->inCache('folder/bar.txt'));
+ }
+
function setUp() {
$this->storage = new \OC\Files\Storage\Temporary(array());
$this->scanner = new \OC\Files\Cache\Scanner($this->storage);