From c64e41eb45df9140c4dbe0c8073e782ccbc68f23 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 6 Nov 2011 22:12:57 -0500 Subject: [PATCH] Fix casing of vars in tests. --- lib/Cake/Test/Case/View/JsonViewTest.php | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/Cake/Test/Case/View/JsonViewTest.php b/lib/Cake/Test/Case/View/JsonViewTest.php index a560ef085..47ba9f2b2 100644 --- a/lib/Cake/Test/Case/View/JsonViewTest.php +++ b/lib/Cake/Test/Case/View/JsonViewTest.php @@ -35,16 +35,16 @@ class JsonViewTest extends CakeTestCase { * @return void */ public function testRenderWithoutView() { - $request = new CakeRequest(); - $response = new CakeResponse(); - $controller = new Controller($request, $response); + $Request = new CakeRequest(); + $Response = new CakeResponse(); + $Controller = new Controller($Request, $Response); $data = array('user' => 'fake', 'list' => array('item1', 'item2')); - $controller->set('serialize', $data); - $view = new JsonView($controller); - $output = $view->render(false); + $Controller->set(array('data' => $data, 'serialize' => 'data')); + $View = new JsonView($Controller); + $output = $View->render(false); $this->assertIdentical(json_encode($data), $output); - $this->assertIdentical('application/json', $response->type()); + $this->assertIdentical('application/json', $Response->type()); } /** @@ -54,9 +54,9 @@ class JsonViewTest extends CakeTestCase { */ public function testRenderWithView() { App::build(array('View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Json'))); - $request = new CakeRequest(); - $response = new CakeResponse(); - $controller = new Controller($request, $response); + $Request = new CakeRequest(); + $Response = new CakeResponse(); + $Controller = new Controller($Request, $Response); $data = array( 'User' => array( 'username' => 'fake' @@ -66,13 +66,13 @@ class JsonViewTest extends CakeTestCase { array('name' => 'item2') ) ); - $controller->set('user', $data); - $view = new JsonView($controller); - $output = $view->render('index'); + $Controller->set('user', $data); + $View = new JsonView($Controller); + $output = $View->render('index'); $expected = json_encode(array('user' => 'fake', 'list' => array('item1', 'item2'))); $this->assertIdentical($expected, $output); - $this->assertIdentical('application/json', $response->type()); + $this->assertIdentical('application/json', $Response->type()); } }