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'); }
/** * {@inheritdoc} */ public function save(File $file, Adapter $adapter) { $adapter->writeContent($file->getName(), $file->getContent()); }