fix storage test case
This commit is contained in:
parent
87d4aaf287
commit
ee28e35ba9
|
@ -173,11 +173,9 @@ abstract class Test_FileStorage extends UnitTestCase {
|
||||||
$supportsTouch = $this->instance->touch('/lorem.txt');
|
$supportsTouch = $this->instance->touch('/lorem.txt');
|
||||||
$mtimeEnd = time();
|
$mtimeEnd = time();
|
||||||
if ($supportsTouch !== false) {
|
if ($supportsTouch !== false) {
|
||||||
$originalCTime = $cTime;
|
|
||||||
$mTime = $this->instance->filemtime('/lorem.txt');
|
$mTime = $this->instance->filemtime('/lorem.txt');
|
||||||
$this->assertTrue(($mtimeStart - 1) <= $mTime);
|
$this->assertTrue(($mtimeStart - 1) <= $mTime);
|
||||||
$this->assertTrue($mTime <= ($mtimeEnd + 1));
|
$this->assertTrue($mTime <= ($mtimeEnd + 1));
|
||||||
$this->assertEqual($cTime, $originalCTime);
|
|
||||||
|
|
||||||
$this->assertTrue($this->instance->hasUpdated('/lorem.txt', $mtimeStart - 1));
|
$this->assertTrue($this->instance->hasUpdated('/lorem.txt', $mtimeStart - 1));
|
||||||
|
|
||||||
|
@ -193,7 +191,6 @@ abstract class Test_FileStorage extends UnitTestCase {
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
$mtimeEnd = time();
|
$mtimeEnd = time();
|
||||||
$originalCTime = $cTime;
|
|
||||||
$mTime = $this->instance->filemtime('/lorem.txt');
|
$mTime = $this->instance->filemtime('/lorem.txt');
|
||||||
$this->assertTrue(($mtimeStart - 1) <= $mTime);
|
$this->assertTrue(($mtimeStart - 1) <= $mTime);
|
||||||
$this->assertTrue($mTime <= ($mtimeEnd + 1));
|
$this->assertTrue($mTime <= ($mtimeEnd + 1));
|
||||||
|
|
Loading…
Reference in New Issue