UserValueResolver example

class UserValueResolverTest extends TestCase
{
    /** * In Symfony 7, keep this test case but remove the call to supports(). * * @group legacy */
    public function testSupportsFailsWithNoType()
    {
        $tokenStorage = new TokenStorage();
        $resolver = new UserValueResolver($tokenStorage);
        $metadata = new ArgumentMetadata('foo', null, false, false, null);

        $this->assertSame([]$resolver->resolve(Request::create('/')$metadata));
        $this->assertFalse($resolver->supports(Request::create('/')$metadata));
    }

    /** * In Symfony 7, keep this test case but remove the call to supports(). * * @group legacy */
    
Home | Imprint | This part of the site doesn't use cookies.