コード例 #1
0
 public function testMatchModuleControllerActionParams()
 {
     $expectedResult = array('page/index/show/param1/value1/param2/value2', 'module' => 'page', 'page', 'controller' => 'index', 'index', '/show', 'action' => 'show', 'show', '/param1/value1/param2/value2', 'params' => 'param1/value1/param2/value2', 'param1/value1/param2/value2');
     $match = $this->router->matchByRegexp($expectedResult[0]);
     $this->assertTrue(is_array($match), $match, 'Expected route does not match!');
     $params = $this->router->convertParamStringIntoArray($match['params']);
     $this->assertEquals($params, array('param1' => 'value1', 'param2' => 'value2'));
 }