/**
  * @param gries\MControl\Storage\Block\BlockStorageInterface $storage
  * @param gries\MControl\Builder\Structure $structure
  * @param gries\MControl\Builder\Block $block
  */
 function it_should_get_all_blocks_for_a_structure(BlockStorageInterface $storage, Structure $structure, Block $block)
 {
     $storage->getByStructure($structure)->shouldBeCalled()->willReturn($block);
     $this->beConstructedWith($storage);
     $this->getByStructure($structure)->shouldReturn($block);
 }
Exemple #2
0
 /**
  * Get all Blocks for a given Structure
  *
  * @param Structure $structure
  *
  * @return array
  */
 public function getByStructure(Structure $structure)
 {
     return $this->storage->getByStructure($structure);
 }