$salesChannelId =
$this->
createSalesChannel();
/* @phpstan-ignore-next-line */
$this->themeService->
assignTheme($themeId,
$salesChannelId,
$context);
$criteria =
new Criteria();
$criteria->
addFilter(new EqualsFilter('name', 'SwagTheme'
));
$appId =
$this->appRepo->
searchIds($criteria,
$context)->
firstId();
static::
expectException(ThemeAssignmentException::
class);
/* @phpstan-ignore-next-line */
$this->appStateService->
deactivateApp($appId,
$context);
} public function testAppWithAChildThemeInUseCannotBeDeactivated(): void
{ if (!
$this->themeService
) { static::
markTestSkipped('AppThemeServiceTest needs storefront to be installed.'
);
} $context = Context::
createDefaultContext();
$this->
loadAppsFromDir(__DIR__ . '/../../Theme/fixtures/Apps/theme'
);
$criteria =
new Criteria();
$criteria->
addFilter(new EqualsFilter('technicalName', 'SwagTheme'
));