Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
detectChangeset example
new
EntityExistence
(
ProductReviewDefinition::ENTITY_NAME,
[
'id' => 'foo'
]
, true, false, false,
[
]
)
)
,
]
)
;
foreach
(
$event
->
getCommands
(
)
as
$command
)
{
static
::
assertInstanceOf
(
ChangeSetAware::
class
,
$command
)
;
static
::
assertFalse
(
$command
->
requiresChangeSet
(
)
)
;
}
$this
->productReviewSubscriber->
detectChangeset
(
$event
)
;
foreach
(
$event
->
getCommands
(
)
as
$command
)
{
static
::
assertInstanceOf
(
ChangeSetAware::
class
,
$command
)
;
static
::
assertTrue
(
$command
->
requiresChangeSet
(
)
)
;
}
}
public
function
testDetectChangesetWithInvalidCommands
(
)
: void
{
$event
= EntityDeleteEvent::
create
(
WriteContext::
createFromContext
(
Context::
createDefaultContext
(
)
)
,
[