public function testCompilesAllThemes(): void
{ $themeService =
$this->
createMock(ThemeService::
class);
$themeLifecycleService =
$this->
createMock(ThemeLifecycleService::
class);
/** @var EntityRepository $salesChannelRepository */
$salesChannelRepository =
$this->
getContainer()->
get('sales_channel.repository'
);
$context = Context::
createDefaultContext();
$themes =
$this->
setupThemes($context);
$updateSubscriber =
new UpdateSubscriber($themeService,
$themeLifecycleService,
$salesChannelRepository);
$event =
new UpdatePostFinishEvent(Context::
createDefaultContext(), 'v6.2.0', 'v6.2.1'
);
$themeLifecycleService->
expects(static::
once())->
method('refreshThemes'
);
$themeService->
expects(static::
atLeast(2
)) ->
method('compileThemeById'
) ->
willReturnCallback(function D
$themeId,
$c) use (&
$themes,
$context) { $this->
assertEquals($context,
$c);
$compiledThemes =
[];
if (isset($themes['otherTheme'
]) &&
$themes['otherTheme'
]['id'
] ===
$themeId) {