Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing some errors from namespace changes.
- Loading branch information
Showing
9 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,28 @@ | |
use Cake\TestSuite\TestCase; | ||
use Cake\Utility\Xml; | ||
|
||
class TestRequest extends Request { | ||
|
||
public function reConstruct($url = 'some/path', $parseEnvironment = true) { | ||
$this->_base(); | ||
if (empty($url)) { | ||
$url = $this->_url(); | ||
} | ||
if ($url[0] == '/') { | ||
$url = substr($url, 1); | ||
} | ||
$this->url = $url; | ||
|
||
if ($parseEnvironment) { | ||
$this->_processPost(); | ||
$this->_processGet(); | ||
$this->_processFiles(); | ||
} | ||
$this->here = $this->base . '/' . $this->url; | ||
} | ||
|
||
} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jrbasso
Author
Member
|
||
|
||
class RequestTest extends TestCase { | ||
|
||
/** | ||
|
@@ -224,7 +246,7 @@ public function testPutParsingJSON() { | |
$_SERVER['REQUEST_METHOD'] = 'PUT'; | ||
$_SERVER['CONTENT_TYPE'] = 'application/json'; | ||
|
||
$request = $this->getMock('TestCakeRequest', array('_readInput')); | ||
$request = $this->getMock(__NAMESPACE__ . '\TestRequest', array('_readInput')); | ||
$request->expects($this->at(0))->method('_readInput') | ||
->will($this->returnValue('{Article":["title"]}')); | ||
$request->reConstruct(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm pretty sure reConstruct() isn't needed anymore, I'll take a look at the tests and update them.