summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-06-19 00:26:47 +0200
committerRobin Appelman <icewind@owncloud.com>2013-06-19 00:26:47 +0200
commit0b74e71de83801475a029951cdc85d2942307856 (patch)
treed6e70c0d4a25be445ccd88a174a7d2ad568c3fc9 /tests
parent2ed0e6e91573489b9db0c37d1d4f3ae1c1393f00 (diff)
downloadnextcloud-server-0b74e71de83801475a029951cdc85d2942307856.tar.gz
nextcloud-server-0b74e71de83801475a029951cdc85d2942307856.zip
fix updaters test cases
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/cache/updater.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/lib/files/cache/updater.php b/tests/lib/files/cache/updater.php
index dad3cd7e650..198d601b1bb 100644
--- a/tests/lib/files/cache/updater.php
+++ b/tests/lib/files/cache/updater.php
@@ -69,6 +69,7 @@ class Updater extends \PHPUnit_Framework_TestCase {
public function testWrite() {
$textSize = strlen("dummy file data\n");
$imageSize = filesize(\OC::$SERVERROOT . '/core/img/logo.png');
+ $this->cache->put('foo.txt', array('mtime' => 100));
$rootCachedData = $this->cache->get('');
$this->assertEquals(3 * $textSize + $imageSize, $rootCachedData['size']);
@@ -77,11 +78,9 @@ class Updater extends \PHPUnit_Framework_TestCase {
$cachedData = $this->cache->get('foo.txt');
$this->assertEquals(3, $cachedData['size']);
$this->assertNotEquals($fooCachedData['etag'], $cachedData['etag']);
- $mtime = $cachedData['mtime'];
$cachedData = $this->cache->get('');
$this->assertEquals(2 * $textSize + $imageSize + 3, $cachedData['size']);
$this->assertNotEquals($rootCachedData['etag'], $cachedData['etag']);
- $this->assertGreaterThanOrEqual($rootCachedData['mtime'], $mtime);
$rootCachedData = $cachedData;
$this->assertFalse($this->cache->inCache('bar.txt'));