function let(KnowsContent $adapter, Adapter $other, File $file)
 {
     $adapter->implement('Gaufrette\\Core\\Adapter');
     $adapter->readContent('file.png')->willReturn('the adapter content');
     $file->getName()->willReturn('file.png');
     $file->getContent()->willReturn('the file content');
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function save(File $file, Adapter $adapter)
 {
     $adapter->writeContent($file->getName(), $file->getContent());
 }