|
|
@@ -388,8 +388,31 @@ class Zend_Application_Resource_FrontcontrollerTest extends PHPUnit_Framework_Te
|
|
|
$front = $resource->getFrontController();
|
|
|
$this->assertTrue($front->returnResponse());
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @group ZF-9724
|
|
|
+ */
|
|
|
+ public function testShouldSetDispatcherFromConfiguration()
|
|
|
+ {
|
|
|
+ require_once 'Zend/Application/Resource/Frontcontroller.php';
|
|
|
+ $resource = new Zend_Application_Resource_Frontcontroller(array(
|
|
|
+ 'dispatcher' => array(
|
|
|
+ 'class' => 'ZF9724_Dispatcher',
|
|
|
+ 'params' => array(
|
|
|
+ 'bar' => 'baz'
|
|
|
+ )
|
|
|
+ )
|
|
|
+ ));
|
|
|
+ $resource->init();
|
|
|
+ $front = $resource->getFrontController();
|
|
|
+ $this->assertEquals('ZF9724_Dispatcher', get_class($front->getDispatcher()));
|
|
|
+ $this->assertEquals('baz', $front->getDispatcher()->getParam('bar'));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+require_once 'Zend/Controller/Dispatcher/Standard.php';
|
|
|
+class ZF9724_Dispatcher extends Zend_Controller_Dispatcher_Standard {}
|
|
|
+
|
|
|
if (PHPUnit_MAIN_METHOD == 'Zend_Application_Resource_FrontcontrollerTest::main') {
|
|
|
Zend_Application_Resource_FrontcontrollerTest::main();
|
|
|
}
|