Beispiel #1
0
 public function testGetInstance()
 {
     $routeConf = array('route' => 'forum/(\\d+)', 'reverse' => 'forum/%d', 'defaults' => array('controller' => 'ctrl'));
     /* numeric Zend_Config indexes don't work at the moment
            'map' => array(
                '1' => 'forum_id'
            )
        */
     $config = new \Zend\Config\Config($routeConf);
     $route = Route\Regex::getInstance($config);
     $this->assertType('Zend\\Controller\\Router\\Route\\Regex', $route);
     $values = $route->match('forum/1');
     $this->assertSame('ctrl', $values['controller']);
 }