示例#1
0
 public function testDelete()
 {
     $file = new File($this->filesystem, 'fixtures/base.css');
     $file->copy('temp/drop-the-base.css');
     $newFile = new File($this->filesystem, 'temp/drop-the-base.css');
     $this->assertSame($file->read(), $newFile->read());
     $newFile->delete();
     $this->assertFalse($newFile->exists());
     $newNewFile = new File($this->filesystem, 'temp/drop-the-base.css');
     $this->assertFalse($newNewFile->exists());
 }
示例#2
0
 /**
  * Backup the YAML file.
  */
 protected function backup()
 {
     $this->file->copy($this->file->getPath() . '.' . date('Ymd-His'));
 }