|
|
@@ -93,7 +93,7 @@ class Zend_Application_Resource_NavigationTest extends PHPUnit_Framework_TestCas
|
|
|
|
|
|
public function testInitializationReturnsNavigationObject()
|
|
|
{
|
|
|
- $this->bootstrap->registerPluginResource('view');
|
|
|
+ $this->bootstrap->registerPluginResource('view');
|
|
|
$resource = new Zend_Application_Resource_Navigation(array());
|
|
|
$resource->setBootstrap($this->bootstrap);
|
|
|
$test = $resource->init();
|
|
|
@@ -148,6 +148,32 @@ class Zend_Application_Resource_NavigationTest extends PHPUnit_Framework_TestCas
|
|
|
|
|
|
$this->assertEquals($view->setInMethodByTest,true);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @group ZF-10959
|
|
|
+ */
|
|
|
+ public function testDefaultPageTypeIsSet()
|
|
|
+ {
|
|
|
+ $this->bootstrap->registerPluginResource('view');
|
|
|
+ $this->bootstrap->getPluginResource('view')->getView();
|
|
|
+
|
|
|
+ $options = array('defaultPageType' => 'foobar',
|
|
|
+ 'pages'=> array(array(
|
|
|
+ 'action' => 'index',
|
|
|
+ 'controller' => 'index')));
|
|
|
+
|
|
|
+ $results = array();
|
|
|
+ $resource = new Zend_Application_Resource_Navigation($options);
|
|
|
+
|
|
|
+ try {
|
|
|
+ $resource->setBootstrap($this->bootstrap)->init();
|
|
|
+ $this->fail('An exception should have been thrown but wasn\'t');
|
|
|
+ } catch(Zend_Exception $e) {
|
|
|
+ $this->assertTrue(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ $this->bootstrap->unregisterPluginResource('view');
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* @group ZF-7461
|