summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-06-15 16:43:24 +0200
committerRobin Appelman <icewind@owncloud.com>2012-06-15 16:43:24 +0200
commit449760f665a2416875458cbb3f34387df038b08a (patch)
tree3ad398644dee204c3b7bdc16c95effcc30d094b1 /tests
parent6ca87656befb4ae30bd17547f34e6c3263c83c64 (diff)
downloadnextcloud-server-449760f665a2416875458cbb3f34387df038b08a.tar.gz
nextcloud-server-449760f665a2416875458cbb3f34387df038b08a.zip
add hasUpdated to oc_filestorage
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/filestorage.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib/filestorage.php b/tests/lib/filestorage.php
index f71b658253a..00f37b9f1a2 100644
--- a/tests/lib/filestorage.php
+++ b/tests/lib/filestorage.php
@@ -149,6 +149,9 @@ abstract class Test_FileStorage extends UnitTestCase {
$this->assertTrue(($ctimeStart-1)<=$cTime);
$this->assertTrue($cTime<=($ctimeEnd+1));
}
+ $this->assertTrue($this->instance->hasUpdated('/lorem.txt',$ctimeStart-1));
+ $this->assertTrue($this->instance->hasUpdated('/',$ctimeStart-1));
+
$this->assertTrue(($ctimeStart-1)<=$mTime);
$this->assertTrue($mTime<=($ctimeEnd+1));
$this->assertEqual(filesize($textFile),$this->instance->filesize('/lorem.txt'));
@@ -168,6 +171,8 @@ abstract class Test_FileStorage extends UnitTestCase {
$this->assertTrue(($mtimeStart-1)<=$mTime);
$this->assertTrue($mTime<=($mtimeEnd+1));
$this->assertEqual($cTime,$originalCTime);
+
+ $this->assertTrue($this->instance->hasUpdated('/lorem.txt',$mtimeStart-1));
if($this->instance->touch('/lorem.txt',100)!==false){
$mTime=$this->instance->filemtime('/lorem.txt');
@@ -184,6 +189,9 @@ abstract class Test_FileStorage extends UnitTestCase {
$mTime=$this->instance->filemtime('/lorem.txt');
$this->assertTrue(($mtimeStart-1)<=$mTime);
$this->assertTrue($mTime<=($mtimeEnd+1));
+
+ $this->instance->unlink('/lorem.txt');
+ $this->assertTrue($this->instance->hasUpdated('/',$mtimeStart-1));
}
public function testSearch(){