/**
  * @param gries\MControl\Storage\Structure\StructureStorageInterface $storage
  * @param gries\MControl\Builder\Structure $structure
  */
 function it_should_get_a_structure_by_its_name(StructureStorageInterface $storage, Structure $structure)
 {
     $name = 'somename';
     $storage->getByName($name)->shouldBeCalled()->willReturn($structure);
     $this->beConstructedWith($storage);
     $this->getByName($name)->shouldReturn($structure);
 }
Beispiel #2
0
 /**
  * Get a structure by its name
  *
  * @param $name
  *
  * @return \gries\MControl\Builder\Structure
  */
 public function getByName($name)
 {
     return $this->storage->getByName($name);
 }