Skip to content
Permalink
Browse files

Added unit test for CakeRequest::setInput

Don't use mocks as the tests weren't really testing anything when mocks
were involved.

Refs #3764
  • Loading branch information...
derekperkins authored and markstory committed Jun 21, 2014
1 parent 6bf0b22 commit b1a3ab9e646b04141497a5ea503c437d9addaeb4
Showing with 17 additions and 1 deletion.
  1. +17 −1 lib/Cake/Test/Case/Network/CakeRequestTest.php
@@ -2081,7 +2081,7 @@ public function testParamReading($toRead, $expected) {
/**
* Data provider for testing reading values with CakeRequest::param()
*
*
* @return array
*/
public function paramReadingDataProvider() {
@@ -2218,6 +2218,22 @@ public function testHere() {
$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.
*

0 comments on commit b1a3ab9

Please sign in to comment.
You can’t perform that action at this time.