public function setUp()
 {
     $view = new View();
     $base = str_replace('/', DIRECTORY_SEPARATOR, '/../_templates');
     $view->resolver()->addPath(__DIR__ . $base);
     $view->vars()->setStrictVars(true);
     $this->view = $view;
 }
Exemple #2
0
 /**
  * @return void
  */
 public function testPartialRendersScriptWithVars()
 {
     $view = new View();
     $view->resolver()->addPath($this->basePath . '/application/views/scripts');
     $view->vars()->message = 'This should never be read';
     $this->helper->setView($view);
     $return = $this->helper->__invoke('partialThree.phtml', array('message' => 'This message should be read'));
     $this->assertNotContains('This should never be read', $return);
     $this->assertContains('This message should be read', $return, $return);
 }