mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Adding tests for CakeRequest::addParams()
This commit is contained in:
parent
40bca71985
commit
0a7ba707b6
1 changed files with 15 additions and 0 deletions
|
@ -63,6 +63,21 @@ class CakeRequestTestCase extends CakeTestCase {
|
|||
$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.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue