Ejemplo n.º 1
0
 public function testSetBlockTheme()
 {
     // prepare test data
     $this->rawLayout->add('root', null, 'root');
     $this->rawLayout->add('header', 'root', 'header');
     // do test
     $this->rawLayout->setBlockTheme('root', ['MyBundle:Layout:theme1.html.twig', 'MyBundle:Layout:theme2.html.twig']);
     $this->rawLayout->setBlockTheme('root', 'MyBundle:Layout:theme3.html.twig');
     $this->rawLayout->setBlockTheme('header', 'MyBundle:Layout:header_theme1.html.twig');
     $this->rawLayout->setBlockTheme('header', ['MyBundle:Layout:header_theme2.html.twig', 'MyBundle:Layout:header_theme3.html.twig']);
     $blockThemes = $this->rawLayout->getBlockThemes();
     $this->assertSame(['root' => ['MyBundle:Layout:theme1.html.twig', 'MyBundle:Layout:theme2.html.twig', 'MyBundle:Layout:theme3.html.twig'], 'header' => ['MyBundle:Layout:header_theme1.html.twig', 'MyBundle:Layout:header_theme2.html.twig', 'MyBundle:Layout:header_theme3.html.twig']], $blockThemes);
 }