public function testItRemovesAChildThemeCorrectly(): void
{ $bundle =
$this->
getThemeConfig();
$this->themeLifecycleService->
refreshTheme($bundle,
$this->context
);
$themeEntity =
$this->
getTheme($bundle, true
);
$childId = Uuid::
randomHex();
static::
assertInstanceOf(ThemeCollection::
class,
$themeEntity->
getDependentThemes());
// check if we have no dependent Themes
static::
assertEquals(0,
$themeEntity->
getDependentThemes()->
count());
// clone theme and make it child
$this->themeRepository->
clone($themeEntity->
getId(),
$this->context,
$childId,
new CloneBehavior([ 'technicalName' => null,
'name' => 'Cloned theme',
'parentThemeId' =>
$themeEntity->
getId(),
]));
// refresh theme to get child