Example #1
0
 public function testAutoLayoutRenderingOnDoubleTemplateRender()
 {
     Template::config(array('path_layouts' => $this->templateDir . 'layouts/', 'auto_layout' => 'div'));
     $tpl = new Template('test');
     $tpl->layout(false);
     $content = $tpl->content();
     $tpl2 = new Template('test');
     $this->assertEquals('<div><p>Test</p></div>', $tpl2->content());
 }
Example #2
0
 public function testBlockRendersInLayoutWithSetContent()
 {
     $tpl = new Template('block');
     $tpl->layout('layouts/block');
     $this->assertEquals("<script src='one.js'></script>\n<script src='two.js'></script>\n<div><p>Test</p></div>", $tpl->content());
 }