Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit d5cdc46661b207fbb35d3338f26eb4024937d29c 1 parent 44ea3fb
@ceeram ceeram authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/Cake/Test/Case/Network/CakeRequestTest.php
View
9 lib/Cake/Test/Case/Network/CakeRequestTest.php
@@ -172,7 +172,7 @@ public function testPostParsing() {
'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 @@ public function testPostParsing() {
));
$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']);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.