Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
onGetConcatenatedStyles example
static
::
assertSame
(
$expected
,
$actual
)
;
}
public
function
testConcanatedStylesEventPassThru
(
)
: void
{
$subscriber
=
new
MockThemeCompilerConcatenatedSubscriber
(
)
;
$styles
= 'body {}';
$event
=
new
ThemeCompilerConcatenatedStylesEvent
(
$styles
,
$this
->mockSalesChannelId
)
;
$subscriber
->
onGetConcatenatedStyles
(
$event
)
;
$actual
=
$event
->
getConcatenatedStyles
(
)
;
$expected
=
$styles
. MockThemeCompilerConcatenatedSubscriber::STYLES_CONCAT;
static
::
assertEquals
(
$expected
,
$actual
)
;
}
public
function
testConcanatedScriptsEventPassThrough
(
)
: void
{
$subscriber
=
new
MockThemeCompilerConcatenatedSubscriber
(
)
;
static
::
assertSame
(
$expected
,
$actual
)
;
}
public
function
testConcanatedStylesEventPassThru
(
)
: void
{
$subscriber
=
new
MockThemeCompilerConcatenatedSubscriber
(
)
;
$styles
= 'body {}';
$event
=
new
ThemeCompilerConcatenatedStylesEvent
(
$styles
,
$this
->mockSalesChannelId
)
;
$subscriber
->
onGetConcatenatedStyles
(
$event
)
;
$actual
=
$event
->
getConcatenatedStyles
(
)
;
$expected
=
$styles
. MockThemeCompilerConcatenatedSubscriber::STYLES_CONCAT;
static
::
assertEquals
(
$expected
,
$actual
)
;
}
public
function
testConcanatedScriptsEventPassThrough
(
)
: void
{
$subscriber
=
new
MockThemeCompilerConcatenatedSubscriber
(
)
;