Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / http-kernel / Tests / Controller / ArgumentResolver / ServiceValueResolverTest.php
index 7d34172ce3d8fe31f8f7f0ecde8520da02d55bf1..f6a3689638714e28be2220352e326d7f79d7be51 100644 (file)
@@ -66,6 +66,24 @@ class ServiceValueResolverTest extends TestCase
         $this->assertYieldEquals(array(new DummyService()), $resolver->resolve($request, $argument));
     }
 
+    public function testExistingControllerWithMethodNameStartUppercase()
+    {
+        $resolver = new ServiceValueResolver(new ServiceLocator(array(
+            'App\\Controller\\Mine::method' => function () {
+                return new ServiceLocator(array(
+                    'dummy' => function () {
+                        return new DummyService();
+                    },
+                ));
+            },
+        )));
+        $request = $this->requestWithAttributes(array('_controller' => 'App\\Controller\\Mine::Method'));
+        $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null);
+
+        $this->assertTrue($resolver->supports($request, $argument));
+        $this->assertYieldEquals(array(new DummyService()), $resolver->resolve($request, $argument));
+    }
+
     public function testControllerNameIsAnArray()
     {
         $resolver = new ServiceValueResolver(new ServiceLocator(array(