Browse Source

remove passedArgs

Refs: https://github.com/cakephp/cakephp/pull/12052
saeid 8 years ago
parent
commit
fdcc1d9439

+ 0 - 1
src/Controller/Controller.php

@@ -438,7 +438,6 @@ class Controller implements EventListenerInterface, EventDispatcherInterface
      * which must also be updated here. The properties that get set are:
      *
      * - $this->request - To the $request parameter
-     * - $this->passedArgs - Same as $request->params['pass]
      *
      * @param \Cake\Http\ServerRequest $request Request instance.
      * @return $this

+ 1 - 0
tests/TestCase/Controller/ControllerTest.php

@@ -1098,6 +1098,7 @@ class ControllerTest extends TestCase
         $this->assertSame($request, $controller->getRequest());
 
         $this->assertEquals('Posts', $controller->getRequest()->getParam('plugin'));
+        $this->assertEquals(['foo', 'bar'], $controller->getRequest()->getParam('pass'));
     }
 
     /**

+ 4 - 6
tests/TestCase/View/ViewVarsTraitTest.php

@@ -186,12 +186,10 @@ class ViewVarsTraitTest extends TestCase
      */
     public function testViewOptionsGetsToBuilder()
     {
-        $this->deprecated(function () {
-            $this->subject->passedArgs = 'test';
-            $this->subject->createView();
-            $result = $this->subject->viewBuilder()->getOptions();
-            $this->assertEmpty($result);
-        });
+        $this->subject->passedArgs = 'test';
+        $this->subject->createView();
+        $result = $this->subject->viewBuilder()->getOptions();
+        $this->assertEmpty($result);
     }
 
     /**