diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-07-16 23:07:35 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-07-16 23:07:35 +0200 |
commit | cfac7fcd53974ddf20ddb75a0cb3b5a73047568a (patch) | |
tree | 735b4b3345e1ecdde6c3eea41ea69b51a3fa6819 /tests/lib | |
parent | 97f0bc1c4aef3f46b7928e8c2a547c0a35007687 (diff) | |
download | nextcloud-server-cfac7fcd53974ddf20ddb75a0cb3b5a73047568a.tar.gz nextcloud-server-cfac7fcd53974ddf20ddb75a0cb3b5a73047568a.zip |
Storage: remove some unneeded strict tests of mtime behaviour
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/files/storage/storage.php | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php index dc2de18be17..46818c3b4a1 100644 --- a/tests/lib/files/storage/storage.php +++ b/tests/lib/files/storage/storage.php @@ -180,31 +180,12 @@ abstract class Storage extends \PHPUnit_Framework_TestCase { $this->assertEquals($stat['size'], $this->instance->filesize('/lorem.txt')); $this->assertEquals($stat['mtime'], $mTime); - $mtimeStart = time(); - $supportsTouch = $this->instance->touch('/lorem.txt'); - $mtimeEnd = time(); - if ($supportsTouch !== false) { + if ($this->instance->touch('/lorem.txt', 100) !== false) { $mTime = $this->instance->filemtime('/lorem.txt'); - $this->assertTrue(($mtimeStart - 1) <= $mTime); - $this->assertTrue($mTime <= ($mtimeEnd + 1)); - - $this->assertTrue($this->instance->hasUpdated('/lorem.txt', $mtimeStart - 1)); - - if ($this->instance->touch('/lorem.txt', 100) !== false) { - $mTime = $this->instance->filemtime('/lorem.txt'); - $this->assertEquals($mTime, 100); - } + $this->assertEquals($mTime, 100); } $mtimeStart = time(); - $fh = $this->instance->fopen('/lorem.txt', 'a'); - fwrite($fh, ' '); - fclose($fh); - clearstatcache(); - $mtimeEnd = time(); - $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)); |