From fa894beb5cdc245ab6153bf6b35058803764afe4 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 19 Jun 2013 00:26:47 +0200 Subject: [PATCH] fix updaters test cases --- tests/lib/files/cache/updater.php | 3 +-- 1 file changed, 1 insertion(+), 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')); -- 2.39.5