// sets the modification time of the file to the given value.
// If mtime is nil the current time is set.
// note that the access time of the file always changes to the current time.
- if(!$this->isUpdatable($path)) {
+ if($this->file_exists($path) and !$this->isUpdatable($path)) {
return false;
}
if(!is_null($mtime)) {
$content = stream_get_contents($fh);
$this->assertEquals(file_get_contents($textFile), $content);
}
+
+ public function testTouchCreateFile(){
+ $this->assertFalse($this->instance->file_exists('foo'));
+ $this->instance->touch('foo');
+ $this->assertTrue($this->instance->file_exists('foo'));
+ }
}