mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 18:42:40 +00:00
Fix missing query arguments in array urls.
Adding documented features that previously wasn't implemented. Fixes #3328
This commit is contained in:
parent
093275aef6
commit
9ce70044b0
2 changed files with 25 additions and 3 deletions
|
@ -619,6 +619,24 @@ class ObjectTest extends CakeTestCase {
|
|||
$this->assertEquals($expected, $result['named']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that requestAction handles get parameters correctly.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testRequestActionGetParameters() {
|
||||
$result = $this->object->requestAction(
|
||||
'/request_action/params_pass?get=value&limit=5'
|
||||
);
|
||||
$this->assertEquals('value', $result->query['get']);
|
||||
|
||||
$result = $this->object->requestAction(
|
||||
array('controller' => 'request_action', 'action' => 'params_pass'),
|
||||
array('url' => array('get' => 'value', 'limit' => 5))
|
||||
);
|
||||
$this->assertEquals('value', $result->query['get']);
|
||||
}
|
||||
|
||||
/**
|
||||
* test that requestAction does not fish data out of the POST
|
||||
* superglobal.
|
||||
|
@ -632,7 +650,6 @@ class ObjectTest extends CakeTestCase {
|
|||
'item' => 'value'
|
||||
));
|
||||
$result = $this->object->requestAction(array('controller' => 'request_action', 'action' => 'post_pass'));
|
||||
$expected = null;
|
||||
$this->assertEmpty($result);
|
||||
|
||||
$result = $this->object->requestAction(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue