ActiveAppsLoader example

$connection
            ->expects(static::exactly(2))
            ->method('fetchAllAssociative')
            ->willReturn([
                [
                    'name' => 'test',
                    'path' => 'test',
                    'author' => 'test',
                ],
            ]);

        $activeAppsLoader = new ActiveAppsLoader(
            $connection,
            $this->createMock(AbstractAppLoader::class),
            '/'
        );

        $expected = [
            [
                'name' => 'test',
                'path' => 'test',
                'author' => 'test',
            ],
        ];

                'ShopwareBundleWithSnippets' => new ShopwareBundleWithSnippets(),
            ]
        );

        $collection = new SnippetFileCollection();

        $snippetFileLoader = new SnippetFileLoader(
            $kernel,
            $this->createMock(Connection::class),
            $this->createMock(AppSnippetFileLoader::class),
            new ActiveAppsLoader(
                $this->createMock(Connection::class),
                $this->createMock(AppLoader::class),
                '/'
            )
        );

        $snippetFileLoader->loadSnippetFilesIntoCollection($collection);

        static::assertCount(2, $collection);

        $snippetFile = $collection->getSnippetFilesByIso('de-DE')[0];
        
Home | Imprint | This part of the site doesn't use cookies.