UserDefinition example

public function testGenerateUserRecoveryUserNotFound(): void
    {
        $userEmail = 'nonexistent@example.com';
        $context = new Context(new SystemSource()[], Defaults::CURRENCY, [Defaults::LANGUAGE_SYSTEM]);
        $recoveryEntity = new UserRecoveryEntity();
        $recoveryEntity->setUniqueIdentifier(Uuid::randomHex());

        /** @var StaticEntityRepository<UserCollection> $userRepository */
        $userRepository = new StaticEntityRepository([
            new UserCollection([]),
        ]new UserDefinition());

        /** @var StaticEntityRepository<UserRecoveryCollection> $recoveryRepository */
        $recoveryRepository = new StaticEntityRepository([
            new UserRecoveryCollection([$recoveryEntity]),
            new UserRecoveryCollection([$recoveryEntity]),
        ]new UserRecoveryDefinition());

        /** @var StaticEntityRepository<SalesChannelCollection> $salesChannelRepository */
        $salesChannelRepository = new StaticEntityRepository([
            new SalesChannelCollection([]),
        ]new SalesChannelDefinition());

        
Home | Imprint | This part of the site doesn't use cookies.