Browse Source

Fix json view test.

Mark Story 8 years ago
parent
commit
1f1a6eef16
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/TestCase/View/JsonViewTest.php

+ 2 - 2
tests/TestCase/View/JsonViewTest.php

@@ -295,13 +295,13 @@ class JsonViewTest extends TestCase
         $this->assertSame(json_encode($data), $output);
         $this->assertSame('application/json', $View->response->getType());
 
-        $View->request->query = ['callback' => 'jfunc'];
+        $View->request = $View->request->withQueryParams(['callback' => 'jfunc']);
         $output = $View->render(false);
         $expected = 'jfunc(' . json_encode($data) . ')';
         $this->assertSame($expected, $output);
         $this->assertSame('application/javascript', $View->response->getType());
 
-        $View->request->query = ['jsonCallback' => 'jfunc'];
+        $View->request = $View->request->withQueryParams(['jsonCallback' => 'jfunc']);
         $View->viewVars['_jsonp'] = 'jsonCallback';
         $output = $View->render(false);
         $expected = 'jfunc(' . json_encode($data) . ')';