/**
  * Save files
  */
 function it_save_files(File $file, Filesystem $filesystem, GeneratorContract $generator)
 {
     $generator->generate($file)->willReturn($code = 'foo')->shouldBeCalled();
     $filesystem->put('MyFile.php', $code);
     $this->save($file, 'MyFile.php');
 }
Esempio n. 2
0
 /**
  * @param File   $file
  * @param string $path
  */
 public function save(File $file, $path)
 {
     $code = $this->generator->generate($file);
     $this->filesystem->put($path, $code);
 }