Beispiel #1
0
 function testHttp_ViewSetPartial()
 {
     $locator = new A_Locator();
     $view = new A_Http_View($locator);
     $file = 'foobar.php';
     $view->setTemplate($file);
     $view->setTemplatePath(dirname(__FILE__) . '/templates');
     $view->setPartial('bar', $file, array('foo' => 'Bar. ', 'bar' => 'Baz. '));
     $view->set('foo', 'Foo. ');
     $this->assertEqual('Foo. Bar. Baz. ', $view->render());
     $data = array('One, ', 'Two, ', 'Three. ');
     $view->set('foo', '');
     $view->set('bar', '');
     $view->setPartialLoop('foo', $file, 'bar', $data);
     $this->assertEqual('One, Two, Three. ', $view->render());
 }