示例#1
0
 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');
 }
示例#2
0
 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'));
 }