/** * testRenderLoadHelper method * * @access public * @return void */ function testRenderLoadHelper() { $this->PostsController->helpers = array('Html', 'Form', 'Ajax'); $View = new TestView($this->PostsController); $result = $View->_render($View->getViewFileName('index'), array()); $this->assertEqual($result, 'posts index'); $helpers = $View->loaded; $this->assertTrue(is_object($helpers['html'])); $this->assertTrue(is_object($helpers['form'])); $this->assertTrue(is_object($helpers['form']->Html)); $this->assertTrue(is_object($helpers['ajax']->Html)); $this->PostsController->helpers = array('Html', 'Form', 'Ajax', 'TestPlugin.TestPluginHelper'); $View = new TestView($this->PostsController); $result = $View->_render($View->getViewFileName('index'), array()); $this->assertEqual($result, 'posts index'); $helpers = $View->loaded; $this->assertTrue(is_object($helpers['html'])); $this->assertTrue(is_object($helpers['form'])); $this->assertTrue(is_object($helpers['form']->Html)); $this->assertTrue(is_object($helpers['ajax']->Html)); $this->assertTrue(is_object($helpers['testPluginHelper']->TestPluginOtherHelper)); }