diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-07 10:28:37 -0500 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-07 10:28:37 -0500 |
commit | 6801f82d090195573972e15d3cda96b0fde24460 (patch) | |
tree | c441d8ca8f284fd0b0f2d16c822f6256274eeffc /tests | |
parent | d0a50fae8317e4b4871027ee4b2940ab5443961f (diff) | |
parent | d0377b1951a156e218ca0200340e2bcfb51ac0c8 (diff) | |
download | nextcloud-server-6801f82d090195573972e15d3cda96b0fde24460.tar.gz nextcloud-server-6801f82d090195573972e15d3cda96b0fde24460.zip |
Merge branch 'filesystem' into filesystem-etags
Conflicts:
lib/files/cache/cache.php
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/cache/watcher.php | 14 | ||||
-rw-r--r-- | tests/lib/files/view.php | 1 |
2 files changed, 8 insertions, 7 deletions
diff --git a/tests/lib/files/cache/watcher.php b/tests/lib/files/cache/watcher.php index 07c8ac3640c..e8a1689cab0 100644 --- a/tests/lib/files/cache/watcher.php +++ b/tests/lib/files/cache/watcher.php @@ -32,7 +32,7 @@ class Watcher extends \PHPUnit_Framework_TestCase { function testWatcher() { $storage = $this->getTestStorage(); $cache = $storage->getCache(); - $updater = new \OC\Files\Cache\Watcher($storage); + $updater = $storage->getWatcher(); //set the mtime to the past so it can detect an mtime change $cache->put('', array('mtime' => 10)); @@ -66,16 +66,16 @@ class Watcher extends \PHPUnit_Framework_TestCase { public function testFileToFolder() { $storage = $this->getTestStorage(); $cache = $storage->getCache(); - $updater = new \OC\Files\Cache\Watcher($storage); + $updater = $storage->getWatcher(); //set the mtime to the past so it can detect an mtime change $cache->put('', array('mtime' => 10)); $storage->unlink('foo.txt'); - $storage->rename('folder','foo.txt'); + $storage->rename('folder', 'foo.txt'); $updater->checkUpdate(''); - $entry= $cache->get('foo.txt'); + $entry = $cache->get('foo.txt'); $this->assertEquals(-1, $entry['size']); $this->assertEquals('httpd/unix-directory', $entry['mimetype']); $this->assertFalse($cache->inCache('folder')); @@ -83,16 +83,16 @@ class Watcher extends \PHPUnit_Framework_TestCase { $storage = $this->getTestStorage(); $cache = $storage->getCache(); - $updater = new \OC\Files\Cache\Watcher($storage); + $updater = $storage->getWatcher(); //set the mtime to the past so it can detect an mtime change $cache->put('foo.txt', array('mtime' => 10)); $storage->unlink('foo.txt'); - $storage->rename('folder','foo.txt'); + $storage->rename('folder', 'foo.txt'); $updater->checkUpdate('foo.txt'); - $entry= $cache->get('foo.txt'); + $entry = $cache->get('foo.txt'); $this->assertEquals('httpd/unix-directory', $entry['mimetype']); $this->assertTrue($cache->inCache('foo.txt/bar.txt')); } diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php index 712166ab32c..53271142672 100644 --- a/tests/lib/files/view.php +++ b/tests/lib/files/view.php @@ -43,6 +43,7 @@ class View extends \PHPUnit_Framework_TestCase { $cachedData = $rootView->getFileInfo('/foo.txt'); $this->assertEquals($textSize, $cachedData['size']); $this->assertEquals('text/plain', $cachedData['mimetype']); + $this->assertNotEquals(-1, $cachedData['permissions']); $cachedData = $rootView->getFileInfo('/'); $this->assertEquals($storageSize * 3, $cachedData['size']); |