function it_lists_behaviors(KnowsItsBehaviors $behaviors, KnowsContent $content) { $behaviors->implement('Gaufrette\\Core\\Adapter'); $behaviors->implement('Gaufrette\\Core\\Adapter\\KnowsContent'); $behaviors->getBehaviors()->willReturn(array('Gaufrette\\Core\\Adapter\\KnowsMetadata', 'Gaufrette\\Core\\Adapter\\KnowsSize')); $content->implement('Gaufrette\\Core\\Adapter'); $this->allFromAdapter($behaviors)->shouldReturn(array('Gaufrette\\Core\\Adapter\\KnowsMetadata', 'Gaufrette\\Core\\Adapter\\KnowsSize')); $this->allFromAdapter($content)->shouldReturn(array('Gaufrette\\Core\\Adapter\\KnowsContent')); }
function it_gets_content(KnowsContent $adapter, File $file) { $adapter->writeContent('file.png', 'the file content')->shouldBeCalled(); $this->save($file, $adapter); }