Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ProductStreamEntity example
public
function
testGetDecoratedShouldThrowException
(
)
: void
{
static
::
expectException
(
DecorationPatternException::
class
)
;
$this
->searchIndexer->
getDecorated
(
)
;
}
public
function
testGlobalData
(
)
: void
{
$context
= Context::
createDefaultContext
(
)
;
$repository
=
$this
->
createMock
(
EntityRepository::
class
)
;
$productStream
=
new
ProductStreamEntity
(
)
;
$productStream
->
setUniqueIdentifier
(
Uuid::
randomHex
(
)
)
;
$repository
->
method
(
'search'
)
->
willReturn
(
new
EntitySearchResult
(
'product_stream',
1,
new
EntityCollection
(
[
$productStream
]
)
,
null,
new
Criteria
(
)
,
$context
)
)
;