Beispiel #1
0
 /**
  * Writes a file, also creates base directory
  *
  * @param $path
  * @param $contents
  */
 public function write($path, $contents)
 {
     if (!FileKeeper::exists($dir = $this->getBasePath())) {
         FileKeeper::directory($dir);
     }
     FileKeeper::write($path, $contents);
 }
 /** @test */
 function it_deletes_a_file()
 {
     $path = vfsStream::url('gen/text.txt');
     FileKeeper::write($path, 'foo');
     $this->assertFileExists($path);
     FileKeeper::delete($path);
     $this->assertFileNotExists($path);
 }