|
|
@@ -732,6 +732,37 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
|
$this->assertEquals('/articles/777', $url);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Test that it is possible to generate a URL with a numerical key
|
|
|
+ *
|
|
|
+ * @since 2010-06-11
|
|
|
+ * @group ZF-8914
|
|
|
+ * @covers Zend_Controller_Router_Rewrite::assemble
|
|
|
+ */
|
|
|
+ public function testCanGenerateNumericKeyUri()
|
|
|
+ {
|
|
|
+ $this->_router->addRoute(
|
|
|
+ 'default',
|
|
|
+ new Zend_Controller_Router_Route(
|
|
|
+ ':controller/:action/*',
|
|
|
+ array('controller' => 'index', 'action' => 'index')
|
|
|
+ )
|
|
|
+ );
|
|
|
+
|
|
|
+ $params = array(
|
|
|
+ 'controller' => 'index',
|
|
|
+ 'action' => 'index',
|
|
|
+ '2' => 'foo',
|
|
|
+ 'page' => 'bar',
|
|
|
+ );
|
|
|
+
|
|
|
+ $this->assertEquals(
|
|
|
+ '/index/index/2/foo/page/bar',
|
|
|
+ $this->_router->assemble($params)
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|