public function testRenderViewWithLayoutInBlock() { $this->expectOutputString("begin content end\n"); $tpl = new View(); $tpl->setBlock('name', function () use($tpl) { $tpl->render('index/view_with_layout.php'); }); $tpl->renderBlock('name'); }