Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
addPinkLogoToTheme example
$this
->themeLifecycleService->
refreshTheme
(
$parentBundle
,
$this
->context
)
;
$themeEntity
=
$this
->
getTheme
(
$bundle
)
;
static
::
assertEquals
(
$parentThemeEntity
->
getId
(
)
,
$themeEntity
->
getParentThemeId
(
)
)
;
}
public
function
testYouCanUpdateConfigToAddNewMedia
(
)
: void
{
$bundle
=
$this
->
getThemeConfig
(
)
;
$this
->themeLifecycleService->
refreshTheme
(
$bundle
,
$this
->context
)
;
$this
->
addPinkLogoToTheme
(
$bundle
)
;
$this
->themeLifecycleService->
refreshTheme
(
$bundle
,
$this
->context
)
;
$themeEntity
=
$this
->
getTheme
(
$bundle
)
;
static
::
assertTrue
(
$themeEntity
->
isActive
(
)
)
;
static
::
assertInstanceOf
(
MediaCollection::
class
,
$themeEntity
->
getMedia
(
)
)
;
static
::
assertEquals
(
3,
$themeEntity
->
getMedia
(
)
->
count
(
)
)
;
}
public
function
testItWontThrowIfMediaHasRestrictDeleteAssociation
(
)
: void
{