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'); }