Ejemplo n.º 1
0
 /**
  * Prepares the environment before running a test
  *
  */
 protected function setUp()
 {
     $cwd = __DIR__;
     // read navigation config
     $this->_files = $cwd . '/_files';
     $config = new XmlConfig($this->_files . '/navigation.xml');
     // setup containers from config
     $this->_nav1 = new Navigation($config->get('nav_test1'));
     $this->_nav2 = new Navigation($config->get('nav_test2'));
     // setup view
     $view = new PhpRenderer();
     $view->resolver()->addPath($cwd . '/_files/mvc/views');
     // create helper
     $this->_helper = new $this->_helperName();
     $this->_helper->setView($view);
     // set nav1 in helper as default
     $this->_helper->setContainer($this->_nav1);
 }
Ejemplo n.º 2
0
 public function testZF414()
 {
     $config = new Xml($this->_xmlFileAllSectionsConfig, null);
     $this->assertEquals(null, $config->getSectionName());
     $this->assertEquals(true, $config->areAllSectionsLoaded());
     $config = new Xml($this->_xmlFileAllSectionsConfig, 'all');
     $this->assertEquals('all', $config->getSectionName());
     $this->assertEquals(false, $config->areAllSectionsLoaded());
     $config = new Xml($this->_xmlFileAllSectionsConfig, array('staging', 'other_staging'));
     $this->assertEquals(array('staging', 'other_staging'), $config->getSectionName());
     $this->assertEquals(false, $config->areAllSectionsLoaded());
 }