Example #1
0
 /**
  * File changes are made in memory only, until this methods actually applies
  * them on the filesystem.
  *
  * @param File $file
  *
  * @throws \Symfony\Component\Filesystem\Exception\IOException If the file cannot be written to.
  *
  * @api
  */
 public function save(File $file, $filename = null)
 {
     if ($filename !== null) {
         $file->setFilename($filename);
     }
     $this->filesystem->write($file);
 }
Example #2
0
 function it_saves_files(Filesystem $filesystem, File $file)
 {
     $filesystem->write($file)->shouldBeCalled();
     $this->save($file);
 }