getSystemConfigServiceMock example

static::assertEquals($cmsPageIdBeforeEvent$categoryEntity->getCmsPageId());
        $categorySubscriber->entityLoaded($event);
        static::assertEquals($cmsPageIdAfterEvent$categoryEntity->getCmsPageId());
    }

    /** * @return array<string, array{SystemConfigService, CategoryEntity, string|null, string|null, string|null}> */
    public static function entityLoadedEventDataProvider(): iterable
    {
        yield 'It does not set cms page id if already set by the user' => [
            self::getSystemConfigServiceMock(),
            self::getCategory('foobar', false),
            'foobar',
            'foobar',
            null,
        ];

        yield 'It does not set cms page id if already set by the subscriber' => [
            self::getSystemConfigServiceMock(null, 'cmsPageId'),
            self::getCategory('differentCmsPageId', true),
            'differentCmsPageId',
            'differentCmsPageId',
            
Home | Imprint | This part of the site doesn't use cookies.