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); }
/** * Initialize the view builder associated with the view. * * @since 0.2.0 */ protected function initializeViewBuilder() { if (null === $this->builder) { $this->builder = Views::getViewBuilder(); } }