Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setOrderLineItemId example
class
OrderLineItemDownloadCollectionTest
extends
TestCase
{
public
function
testFilterByOrderLineItemId
(
)
: void
{
$filterId
= Uuid::
randomHex
(
)
;
$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
)
;