public function testArea() { $template = new Template('page', 'template.twig'); $template->addContainer('zone', array()); $expected = array('zone' => array('name' => 'n/a', 'type' => Template::TYPE_STATIC, 'blocks' => array())); $this->assertEquals($template->getContainers(), $expected); }
public function testArea() { $template = new Template('page', 'template.twig'); $template->addContainer('zone_A', array()); $expected = array('zone_A' => array('name' => 'n/a', 'type' => Template::TYPE_STATIC, 'blocks' => array(), 'placement' => array(), 'shared' => false)); $this->assertEquals($template->getContainers(), $expected); $template->addContainer('zone_B', array('shared' => true)); $expected['zone_B'] = array('name' => 'n/a', 'type' => Template::TYPE_STATIC, 'blocks' => array(), 'placement' => array(), 'shared' => true); $this->assertEquals($template->getContainers(), $expected); }
public function testGetContainer() { $template = new Template('page', 'template.twig', array('header' => array('name' => 'Header', 'block' => array('text.block')))); $expected = array('name' => 'Header', 'type' => Template::TYPE_STATIC, 'blocks' => array(), 'placement' => array(), 'shared' => false); $this->assertEquals($expected, $template->getContainer('header')); }