Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getThemeStructuredFields example
foreach
(
$themeConfiguration
[
'fields'
]
as
$item
)
{
static
::
assertStringNotContainsString
(
'sw-theme',
$item
[
'label'
]
)
;
}
}
public
function
testDefaultThemeConfigStructuredFields
(
)
: void
{
$theme
=
$this
->themeRepository->
search
(
new
Criteria
(
)
,
$this
->context
)
->
first
(
)
;
$theme
=
$this
->themeService->
getThemeConfigurationStructuredFields
(
$theme
->
getId
(
)
, false,
$this
->context
)
;
static
::
assertEquals
(
ThemeFixtures::
getThemeStructuredFields
(
)
,
$theme
)
;
}
public
function
testChildThemeConfigStructuredFields
(
)
: void
{
$criteria
=
new
Criteria
(
)
;
$criteria
->
addFilter
(
new
EqualsFilter
(
'technicalName', StorefrontPluginRegistry::BASE_THEME_NAME
)
)
;
/** @var ThemeEntity $baseTheme */
$baseTheme
=
$this
->themeRepository->
search
(
$criteria
,
$this
->context
)
->
first
(
)
;
$name
=
$this
->
createTheme
(