fixed expected and result order in asserts, also added extra test

This commit is contained in:
Ceeram 2012-02-22 22:23:52 +01:00 committed by mark_story
parent 836f913a64
commit 6d3c659260

View file

@ -172,7 +172,7 @@ class CakeRequestTest extends CakeTestCase {
'Article' => array('title')
));
$request = new CakeRequest('some/path');
$this->assertEquals($request->data, $_POST['data']);
$this->assertEquals($_POST['data'], $request->data);
$_POST = array('one' => 1, 'two' => 'three');
$request = new CakeRequest('some/path');
@ -197,6 +197,13 @@ class CakeRequestTest extends CakeTestCase {
));
$request = new CakeRequest('some/path');
$this->assertEquals($request->data, $_POST['data']);
$_POST = array('data' => array(
'Article' => array('title' => 'some title'),
'Tag' => array('Tag' => array(1, 2))
));
$request = new CakeRequest('some/path');
$this->assertEquals($request->data, $_POST['data']);
}
/**