/** * @param gries\MControl\Storage\BlockType\BlockTypeStorageInterface $storage * @param gries\MControl\Builder\BlockType BlockType */ function it_should_get_a_blocktype_by_its_name(BlockTypeStorageInterface $storage, BlockType $blocktype) { $name = 'somename'; $storage->getByName($name)->shouldBeCalled()->willReturn($blocktype); $this->beConstructedWith($storage); $this->getByName($name)->shouldReturn($blocktype); }
public function getByName($name) { return $this->storage->getByName($name); }