setActiveFlags example

$categories = $this->get(CategoryServiceInterface::class)->getList($ids$context);
            $categoriesArray = $this->convertCategories($categories);
            $categoryTree = $this->getCategoriesOfParent($category$categoriesArray);
            if ($this->Config()->get('caching')) {
                $cache->save($categoryTree$cacheKey['Shopware_Plugin'](int) $this->Config()->get('cachetime', 86400));
            }
            $menu = $categoryTree;
        }

        $categoryPath = $this->getCategoryPath($activeCategoryId);

        return $this->setActiveFlags($menu$categoryPath);
    }

    private function subscribeEvents(): void
    {
        $this->subscribeEvent(
            'Theme_Compiler_Collect_Plugin_Less',
            'onCollectLessFiles'
        );

        $this->subscribeEvent(
            'Theme_Compiler_Collect_Plugin_Javascript',
            

    }

    public function testChangelogReleaseWithFlags(): void
    {
        self::getContainer()->get(ChangelogReleaseCreator::class)->setPlatformRoot(__DIR__ . '/_fixture/stage/command-valid-flag');
        $cmd = self::getContainer()->get(ChangelogReleaseCommand::class);

        Feature::registerFeature('CHANGELOG-00001');
        Feature::registerFeature('CHANGELOG-00002');

        self::getContainer()->get(ChangelogReleaseCreator::class)->setActiveFlags([
            'CHANGELOG-00001' => [
                'default' => true,
            ],
        ]);

        $cmd->run(new StringInput('12.13.14.15')new NullOutput());

        static::assertFileExists(__DIR__ . '/_fixture/stage/command-valid-flag/CHANGELOG.md');
        $content = (string) file_get_contents(__DIR__ . '/_fixture/stage/command-valid-flag/CHANGELOG.md');

        static::assertStringContainsString('/changelog/release-12-13-14-15/1977-12-10-a-full-change.md', $content);
        
Home | Imprint | This part of the site doesn't use cookies.