diff --git a/framework/Routes/test/Horde/Routes/RecognitionTest.php b/framework/Routes/test/Horde/Routes/RecognitionTest.php index 3eabe5d..ae20ddf 100644 --- a/framework/Routes/test/Horde/Routes/RecognitionTest.php +++ b/framework/Routes/test/Horde/Routes/RecognitionTest.php @@ -1094,4 +1094,16 @@ class RecognitionTest extends PHPUnit_Framework_TestCase $m->match($path)); } + public function testEmptyIdWithDefault() + { + $m = new Horde_Routes_Mapper(); + $m->connect(':controller/:action/:id', array('controller' => 'content', 'action' => 'view', 'id' => 'all')); + $m->createRegs(array('content')); + + $matchdata = array('controller' => 'content', 'action' => 'view', 'id' => 'x'); + $this->assertEquals($matchdata, $m->match('/content/view/x')); + $matchdata = array('controller' => 'content', 'action' => 'view', 'id' => 0); + $this->assertEquals($matchdata, $m->match('/content/view/0')); + } + }