Skip to content
This repository
Browse code

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

  • Loading branch information...
commit d5cdc46661b207fbb35d3338f26eb4024937d29c 1 parent 44ea3fb
ceeram authored February 22, 2012
9  lib/Cake/Test/Case/Network/CakeRequestTest.php
@@ -172,7 +172,7 @@ public function testPostParsing() {
172 172
 			'Article' => array('title')
173 173
 		));
174 174
 		$request = new CakeRequest('some/path');
175  
-		$this->assertEquals($request->data, $_POST['data']);
  175
+		$this->assertEquals($_POST['data'], $request->data);
176 176
 
177 177
 		$_POST = array('one' => 1, 'two' => 'three');
178 178
 		$request = new CakeRequest('some/path');
@@ -197,6 +197,13 @@ public function testPostParsing() {
197 197
 		));
198 198
 		$request = new CakeRequest('some/path');
199 199
 		$this->assertEquals($request->data, $_POST['data']);
  200
+
  201
+		$_POST = array('data' => array(
  202
+			'Article' => array('title' => 'some title'),
  203
+			'Tag' => array('Tag' => array(1, 2))
  204
+		));
  205
+		$request = new CakeRequest('some/path');
  206
+		$this->assertEquals($request->data, $_POST['data']);
200 207
 	}
201 208
 
202 209
 /**

0 notes on commit d5cdc46

Please sign in to comment.
Something went wrong with that request. Please try again.