--- tests/Zend/Controller/Router/Route/ChainTest.php (revision 23064) +++ tests/Zend/Controller/Router/Route/ChainTest.php (working copy) @@ -116,6 +119,31 @@ $this->assertEquals(2, $res['bar']); } + /** + * @group ZF-8812 + */ + public function testChainingMatchToDefaultValues() + { + $foo = new Zend_Controller_Router_Route( + ':foo', + array('foo' => 'bar'), + array('foo' => '[a-z]{3}') + ); + + $bar = new Zend_Controller_Router_Route_Module(array( + 'module' => 0, + 'controller' => 1, + 'action' => 2 + )); + + $chain = $foo->chain($bar); + + $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/'); + $res = $chain->match($request); + + $this->assertTrue(is_array($res), 'Route did not match to default values.'); + } + public function testChainingShortcutMatch() { $foo = new Zend_Controller_Router_Route_Hostname('www.zend.com', array('foo' => 1));