]> source.dussan.org Git - nextcloud-server.git/commitdiff
Scanner test: ensure mtime in the cache is the same as on the storage to prevent...
authorRobin Appelman <icewind@owncloud.com>
Fri, 5 Jul 2013 12:51:22 +0000 (14:51 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Tue, 30 Jul 2013 12:33:56 +0000 (14:33 +0200)
tests/lib/files/cache/scanner.php

index e93c51441b1348e21e0d95a907aa1de8c678373e..4e059d2cf03942af9ad546c24014d8fd3bba71c8 100644 (file)
@@ -132,6 +132,7 @@ class Scanner extends \PHPUnit_Framework_TestCase {
                $this->scanner->scan('');
                $oldData = $this->cache->get('');
                $this->storage->unlink('folder/bar.txt');
+               $this->cache->put('folder', array('mtime' => $this->storage->filemtime('folder')));
                $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_SIZE);
                $newData = $this->cache->get('');
                $this->assertNotEquals($oldData['etag'], $newData['etag']);