Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
AppAdministrationSnippetCollection example
$repository
=
$this
->
createMock
(
EntityRepository::
class
)
;
$appSnippets
=
[
]
;
foreach
(
$snippetsFromApp
as
$snippet
)
{
$appSnippet
=
new
AppAdministrationSnippetEntity
(
)
;
$appSnippet
->
assign
(
$snippet
)
;
$appSnippets
[
]
=
$appSnippet
;
}
$collection
=
new
AppAdministrationSnippetCollection
(
$appSnippets
)
;
$entitySearchResult
=
new
EntitySearchResult
(
AppAdministrationSnippetDefinition::ENTITY_NAME,
$collection
->
count
(
)
,
$collection
,
null,
new
Criteria
(
)
,
Context::
createDefaultContext
(
)
)
;
$repository
->
method
(
'search'
)