コード例 #1
0
ファイル: TemplateTest.php プロジェクト: LamaDelRay/test_symf
 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);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 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'));
 }