DummyService example

$argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null);
        $request = $this->requestWithAttributes(['_controller' => 'my_controller']);

        $this->assertSame([]$resolver->resolve($request$argument));
        $this->assertFalse($resolver->supports($request$argument));
    }

    public function testExistingController()
    {
        $resolver = new ServiceValueResolver(new ServiceLocator([
            'App\\Controller\\Mine::method' => fn () => new ServiceLocator([
                'dummy' => fn () => new DummyService(),
            ]),
        ]));

        $request = $this->requestWithAttributes(['_controller' => 'App\\Controller\\Mine::method']);
        $argument = new ArgumentMetadata('dummy', DummyService::class, false, false, null);

        $this->assertEquals([new DummyService()]$resolver->resolve($request$argument));
    }

    public function testExistingControllerWithATrailingBackSlash()
    {
        
Home | Imprint | This part of the site doesn't use cookies.