UserConfigCollection example

$context = Context::createDefaultContext(new AdminApiSource('user-id'));

        $userConfig = new UserConfigEntity();
        $userConfig->setUniqueIdentifier('user-config-id');
        $userConfig->setValue([
            'frwUserToken' => 'frw-user-token',
        ]);

        $result = new EntitySearchResult(
            UserConfigDefinition::ENTITY_NAME,
            1,
            new UserConfigCollection([$userConfig]),
            null,
            new Criteria(),
            $context
        );

        $userConfigRepositoryMock = static::createMock(EntityRepository::class);
        $userConfigRepositoryMock->expects(static::once())
            ->method('search')
            ->willReturn($result);

        $innerOptionsProvider = static::createMock(AbstractStoreRequestOptionsProvider::class);

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