Fix other failing test by 1 second difference

This commit is contained in:
Ceeram 2011-12-05 17:13:22 +01:00
parent 09a623e07b
commit 3b8990ffca

View file

@ -324,12 +324,13 @@ class FileTest extends CakeTestCase {
* @return void * @return void
*/ */
public function testLastChange() { public function testLastChange() {
$ts = time();
$someFile = new File(TMP . 'some_file.txt', false); $someFile = new File(TMP . 'some_file.txt', false);
$this->assertFalse($someFile->lastChange()); $this->assertFalse($someFile->lastChange());
$this->assertTrue($someFile->open('r+')); $this->assertTrue($someFile->open('r+'));
$this->assertEquals($someFile->lastChange(), time()); $this->assertTrue($someFile->lastChange() >= $ts);
$someFile->write('something'); $someFile->write('something');
$this->assertEquals($someFile->lastChange(), time()); $this->assertTrue($someFile->lastChange() >= $ts);
$someFile->close(); $someFile->close();
$someFile->delete(); $someFile->delete();
} }