/** * The deployment method. It is automatically called by OPT if * the component is deployed in the template. We can perform some * actions then. * * @param Opt_View $view The view that deploys the component. */ public function setView(Opt_View $view) { $this->_view = $view; $this->_form = $view->get('form'); if (!is_object($this->_form)) { throw new Opl_NoFormDefined_Exception(get_class($this) . ':' . $this->_params['name']); } }
/** * @covers Opt_View::assign * @covers Opt_View::get */ public function testAssignNormalMethods() { $view = new Opt_View('template.tpl'); $view->assign('variable', 'Foo'); $this->assertEquals('Foo', $view->get('variable')); }