--- tests/Zend/Controller/Router/Route/ChainTest.php (revision 23210) +++ tests/Zend/Controller/Router/Route/ChainTest.php (working copy) @@ -120,6 +120,38 @@ } /** + * @group ZF-7368 + */ + public function testChainingStaticDynamicMatchToDefaultValue() + { + $foo = new Zend_Controller_Router_Route_Static('foo'); + $bar = new Zend_Controller_Router_Route(':bar', array('bar' => 1)); + $chain = $foo->chain($bar); + + $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/foo'); + $res = $chain->match($request); + + $this->assertType('array', $res, 'Route did not match'); + $this->assertEquals(1, $res['bar']); + } + + /** + * @group ZF-7368 + */ + public function testChainingStaticDynamicMatchToGivenValue() + { + $foo = new Zend_Controller_Router_Route_Static('foo'); + $bar = new Zend_Controller_Router_Route(':bar', array('bar' => 1)); + $chain = $foo->chain($bar); + + $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/foo/2'); + $res = $chain->match($request); + + $this->assertType('array', $res, 'Route did not match'); + $this->assertEquals(2, $res['bar']); + } + + /** * @group ZF-8812 */ public function testChainingMatchToDefaultValues()