public function testRenderWithLayout() { $this->createTmpTpl(__DIR__ . '/layout.php', '<html><?=$content?></html>'); $this->createTmpTpl(__DIR__ . '/view.php', '<b><?=$test?></b>'); $layout = new View(__DIR__); $layout->setLocalPath('layout'); $view = new View(__DIR__); $view->setLayout($layout); $this->assertEquals('<html><b>123</b></html>', $view->render('view', ['test' => '123'])); $this->unlinkTpl([__DIR__ . '/layout.php', __DIR__ . '/view.php']); }