Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
filterByOrderLineItemId example
$downloadA
=
new
OrderLineItemDownloadEntity
(
)
;
$downloadA
->
setId
(
Uuid::
randomHex
(
)
)
;
$downloadA
->
setOrderLineItemId
(
Uuid::
randomHex
(
)
)
;
$downloadB
=
new
OrderLineItemDownloadEntity
(
)
;
$downloadB
->
setId
(
Uuid::
randomHex
(
)
)
;
$downloadB
->
setOrderLineItemId
(
Uuid::
randomHex
(
)
)
;
$collection
=
new
OrderLineItemDownloadCollection
(
[
$downloadA
,
$downloadB
]
)
;
static
::
assertEquals
(
0,
$collection
->
filterByOrderLineItemId
(
$filterId
)
->
count
(
)
)
;
$downloadA
->
setOrderLineItemId
(
$filterId
)
;
static
::
assertEquals
(
1,
$collection
->
filterByOrderLineItemId
(
$filterId
)
->
count
(
)
)
;
}
}