/** * @group ZF-9823 */ public function test_assemble_without_module_honors_index_parameter_with_resource_id_and_extra_parameters() { $route = new Zend_Rest_Route($this->_front, array(), array()); $params = array('controller' => 'users', 'id' => 1, 'extra' => 'parameter', 'another' => 'parameter', 'index' => true); $url = $route->assemble($params, false, false); $this->assertEquals('users/index/1/extra/parameter/another/parameter', $url); }
public function test_assemble_does_NOT_encode_param_values() { $route = new Zend_Rest_Route($this->_front, array(), array()); $params = array('module' => 'mod', 'controller' => 'user', 'index' => true, 'foo' => 'bar is n!ice'); $url = $route->assemble($params, false, false); $this->assertEquals('mod/user/index/foo/bar is n!ice', $url); }