Пример #1
0
 public function testPHPViewWithFullPath()
 {
     Views::addLocation(new FilesystemLocation(__DIR__ . '/fixtures', ['.php']));
     $view = Views::create(__DIR__ . '/fixtures/php-view.php');
     $this->assertInstanceOf('BrightNucleus\\View\\View\\BaseView', $view);
     $html = $view->render(['title' => 'Dynamic Title']);
     $this->assertEquals(file_get_contents(__DIR__ . '/fixtures/php-view-result.html'), $html);
 }