public function test() { $view = new View(); $view->setDirectory(__DIR__ . '/fixtures'); $result = $view->render('test-partial', ['foo' => 'foo']); $this->assertSame('template partial foo bar', $result); }
public function testRenderWithLayout() { $view = new View(); $view->setDirectory(__DIR__ . '/fixtures'); $view->setLayout('layout'); $result = $view->render('template', ['foo' => 'foo']); $this->assertSame('layout foo template foo', $result); }