コード例 #1
0
ファイル: PartialTest.php プロジェクト: lytc/sloths
 public function test()
 {
     $view = new View();
     $view->setDirectory(__DIR__ . '/fixtures');
     $result = $view->render('test-partial', ['foo' => 'foo']);
     $this->assertSame('template partial foo bar', $result);
 }
コード例 #2
0
ファイル: ViewTest.php プロジェクト: lytc/sloths
 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);
 }