Skip to content

Commit

Permalink
Adding additional tests to requestAction() for requests with named pa…
Browse files Browse the repository at this point in the history
…rameters.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7973 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
markstory committed Jan 7, 2009
1 parent 6c258c0 commit b0e23dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cake/tests/cases/libs/object.test.php
Expand Up @@ -556,6 +556,13 @@ function testRequestActionParamParseAndPass() {
$this->assertEqual($result['action'], 'params_pass');
$this->assertEqual($result['form'], array());
$this->assertEqual($result['plugin'], null);

$result = $this->object->requestAction('/request_action/params_pass/sort:desc/limit:5');
$expected = array('sort' => 'desc', 'limit' => 5,);
$this->assertEqual($result['named'], $expected);

$result = $this->object->requestAction(array('controller' => 'request_action', 'action' => 'params_pass'), array('named' => array('sort' => 'desc', 'limit' => 5)));
$this->assertEqual($result['named'], $expected);
}
/**
* test requestAction and POST parameter passing, and not passing when url is an array.
Expand Down

0 comments on commit b0e23dd

Please sign in to comment.