Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Controller / ControllerResolverTest.php
index 5c4166834e318395815b008cc547cbede36c6aac..8d0fccdd6bb0be031a7485d7145caed24b7302b3 100644 (file)
@@ -72,6 +72,7 @@ class ControllerResolverTest extends UnitTestCase {
    * @see \Drupal\Core\Controller\ControllerResolver::doGetArguments()
    *
    * @group legacy
+   * @expectedDeprecation Drupal\Core\Controller\ControllerResolver::doGetArguments is deprecated as of 8.6.0 and will be removed in 9.0. Inject the "http_kernel.controller.argument_resolver" service instead.
    */
   public function testGetArguments() {
     $controller = function (EntityInterface $entity, $user, RouteMatchInterface $route_match, ServerRequestInterface $psr_7) {
@@ -160,7 +161,7 @@ class ControllerResolverTest extends UnitTestCase {
       // Tests passing a controller via the request.
       [['_controller' => 'Drupal\Tests\Core\Controller\MockContainerAware::getResult'], 'Drupal\Tests\Core\Controller\MockContainerAware', 'This is container aware.'],
       // Tests a request with no controller specified.
-      [[], FALSE]
+      [[], FALSE],
     ];
   }
 
@@ -189,6 +190,7 @@ class ControllerResolverTest extends UnitTestCase {
       ['Drupal\Tests\Core\Controller\MockInvokeController', 'This used __invoke().'],
     ];
   }
+
   /**
    * Tests getControllerFromDefinition() without a callable.
    */
@@ -251,6 +253,7 @@ class ControllerResolverTest extends UnitTestCase {
 }
 
 class MockController {
+
   public function getResult() {
     return 'This is a regular controller.';
   }
@@ -261,6 +264,7 @@ class MockController {
 
 }
 class MockControllerPsr7 {
+
   public function getResult() {
     return ['#markup' => 'This is a regular controller'];
   }
@@ -273,12 +277,15 @@ class MockControllerPsr7 {
 
 class MockContainerInjection implements ContainerInjectionInterface {
   protected $result;
+
   public function __construct($result) {
     $this->result = $result;
   }
+
   public static function create(ContainerInterface $container) {
     return new static('This used injection.');
   }
+
   public function getResult() {
     return $this->result;
   }
@@ -286,12 +293,14 @@ class MockContainerInjection implements ContainerInjectionInterface {
 }
 class MockContainerAware implements ContainerAwareInterface {
   use ContainerAwareTrait;
+
   public function getResult() {
     return 'This is container aware.';
   }
 
 }
 class MockInvokeController {
+
   public function __invoke() {
     return 'This used __invoke().';
   }