Skip to content

Commit

Permalink
Adding tests for CakeRequest::addParams()
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 1, 2010
1 parent 40bca71 commit 0a7ba70
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cake/tests/cases/libs/cake_request.test.php
Expand Up @@ -63,6 +63,21 @@ function testQueryStringParsingFromInputUrl() {
$this->assertEqual($request->query, array('one' => 'something', 'two' => 'else'));
}

/**
* test addParams() method
*
* @return void
*/
function testAddParams() {
$request = new CakeRequest('some/path');
$request->params = array('controller' => 'posts', 'action' => 'view');
$request->addParams(array('plugin' => null, 'action' => 'index'));

$this->assertEqual($request->controller, 'posts');
$this->assertEqual($request->action, 'index');
$this->assertEqual($request->plugin, null);
}

/**
* test parsing POST data into the object.
*
Expand Down

0 comments on commit 0a7ba70

Please sign in to comment.