public function getStructures($type)
{
$structureNames = $this->getStructureNames($type);
$structures = [];
foreach ($structureNames as $structureName) {
$structures[] = $this->getStructureMetadata($type, $structureName);
}
return $structures;
}
/** * It returns all structures that are available. */ public function testGetStructures() { $this->loader->load($this->mappingFile, 'page')->willReturn($this->structure->reveal()); $this->loader->load($this->mappingFile, 'page')->shouldBeCalledTimes(1); $structures = $this->factory->getStructures('page'); $this->assertEquals($this->structure->reveal(), $structures[0]); }