mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Added unit test for CakeRequest::setInput
Don't use mocks as the tests weren't really testing anything when mocks were involved. Refs #3764
This commit is contained in:
parent
6bf0b22195
commit
b1a3ab9e64
1 changed files with 17 additions and 1 deletions
|
@ -2081,7 +2081,7 @@ class CakeRequestTest extends CakeTestCase {
|
|||
|
||||
/**
|
||||
* Data provider for testing reading values with CakeRequest::param()
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function paramReadingDataProvider() {
|
||||
|
@ -2218,6 +2218,22 @@ class CakeRequestTest extends CakeTestCase {
|
|||
$this->assertEquals('/posts/base_path/1/name:value?test=value', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the input() method.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testSetInput() {
|
||||
$request = new CakeRequest('/');
|
||||
|
||||
$request->setInput('I came from setInput');
|
||||
$result = $request->input();
|
||||
$this->assertEquals('I came from setInput', $result);
|
||||
|
||||
$result = $request->input();
|
||||
$this->assertEquals('I came from setInput', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the input() method.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue