示例#1
0
 function initialize($context, $moduleName, $actionName, $viewName)
 {
     $this->setDecorator(self::$isDecorated);
     parent::initialize($context, $moduleName, $actionName, $viewName);
 }
{
    function execute()
    {
    }
    function configure()
    {
    }
    function getEngine()
    {
    }
    function render($templateVars = null)
    {
    }
}
$context = new sfContext();
$view = new myView();
$view->initialize($context, '', '', '');
// ->getContext()
$t->diag('->getContext()');
$view->initialize($context, '', '', '');
$t->is($view->getContext(), $context, '->getContext() returns the current context');
// ->isDecorator() ->setDecorator()
$t->diag('->isDecorator() ->setDecorator()');
$t->is($view->isDecorator(), false, '->isDecorator() returns true if the current view have to be decorated');
$view->setDecorator(true);
$t->is($view->isDecorator(), true, '->setDecorator() sets the decorator status for the view');
// parameter holder proxy
require_once $_test_dir . '/unit/sfParameterHolderTest.class.php';
$pht = new sfParameterHolderProxyTest($t);
$pht->launchTests($view, 'parameter');
// mixins