/** * Test * * @return void */ public function testResolveWithFakePharProtocol() { $path = 'phar://' . __DIR__ . DIRECTORY_SEPARATOR . '_templates' . DIRECTORY_SEPARATOR . 'fake-view.phar'; $this->object->addPath($path); $markup = $this->object->resolve('hello.phtml'); $this->assertFalse($markup); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. * * @return void */ protected function setUp() { $coreConfig = new CoreConfig(); $coreConfig->setValue('stream_wrapper_is_active', 1); $this->object = new Partial($coreConfig); $coreConfig->setValue('stream_wrapper_is_active', 0); $this->view = ViewModel::fromArray(array('name' => 'View Name', 'identifier' => 'view-identifier', 'description' => 'View Description', 'content' => 'View Content')); $this->view->save(); $view = new View(); $templatePathStack = new TemplatePathStack(); $templatePathStack->addPath(GC_TEMPLATE_PATH); $view->setResolver($templatePathStack); $this->object->setView($view); }