TestLoginLinkHandlerUserProvider example

class LoginLinkHandlerTest extends TestCase
{
    private MockObject&UrlGeneratorInterface $router;
    private TestLoginLinkHandlerUserProvider $userProvider;
    private PropertyAccessorInterface $propertyAccessor;
    private ExpiredSignatureStorage $expiredLinkStorage;
    private CacheItemPoolInterface $expiredLinkCache;

    protected function setUp(): void
    {
        $this->router = $this->createMock(UrlGeneratorInterface::class);
        $this->userProvider = new TestLoginLinkHandlerUserProvider();
        $this->propertyAccessor = PropertyAccess::createPropertyAccessor();
        $this->expiredLinkCache = new ArrayAdapter();
        $this->expiredLinkStorage = new ExpiredSignatureStorage($this->expiredLinkCache, 360);
    }

    /** * @group time-sensitive * * @dataProvider provideCreateLoginLinkData */
    public function testCreateLoginLink($user, array $extraProperties, Request $request = null)
    {
Home | Imprint | This part of the site doesn't use cookies.