Permalink
Browse files

Fix casing of vars in tests.

  • Loading branch information...
1 parent b20803b commit c64e41eb45df9140c4dbe0c8073e782ccbc68f23 @markstory markstory committed Nov 7, 2011
Showing with 14 additions and 14 deletions.
  1. +14 −14 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 @@ public function testRenderWithoutView() {
*/
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 @@ public function testRenderWithView() {
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());
}
}

0 comments on commit c64e41e

Please sign in to comment.