Example #1
0
 public function testCustomException()
 {
     $view = new View();
     $view->setExtension('.tpl');
     $result = $view->render(__DIR__ . '/fixtures/custom-extension', ['foo' => 'foo']);
     $this->assertSame('custom extension foo', $result);
 }
Example #2
0
 public function test()
 {
     $view = new View();
     $view->setDirectory(__DIR__ . '/fixtures');
     $result = $view->render('test-partial', ['foo' => 'foo']);
     $this->assertSame('template partial foo bar', $result);
 }