Exemplo n.º 1
0
 public function testLayoutを設定できる()
 {
     $appPath = dirname(__FILE__);
     $path = GENE_TEST_ROOT . '/var/config/view.ini';
     $config = new Zend_Config_Ini($path);
     $instance = new Gene_View_Adapter($config);
     $view = $instance->getView();
     $instance->setLayout($config->toArray());
     $front = Zend_Controller_Front::getInstance();
     $plugin = $front->getPlugin('Zend_Layout_Controller_Plugin_Layout');
     $layout = $plugin->getLayout();
     $this->assertEquals($layout->getContentKey(), 'content');
 }
Exemplo n.º 2
0
 public function testView生成時にdelimiterを設定しない場合デフォルトが設定される()
 {
     $param = array('template' => array('engine' => 'Smarty'), 'Smarty' => array('className' => 'Gene_Smarty_View', 'template' => array('suffix' => 'phtml'), 'cache' => array('path' => GENE_TEST_ROOT . '/var/cache/smarty/')));
     $instance = new Gene_View_Adapter($param);
     $view = $instance->getView('Smarty');
     $engine = $view->getEngine();
     $this->assertEquals($engine->left_delimiter, '{');
     $this->assertEquals($engine->right_delimiter, '}');
 }