Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getLocaleRepository example
AppEntity
$appEntity
,
array
$snippets
)
: void
{
$cacheInvalidator
=
$this
->
createMock
(
CacheInvalidator::
class
)
;
$cacheInvalidator
->
expects
(
static
::
once
(
)
)
->
method
(
'invalidate'
)
->
with
(
[
CachedSnippetFinder::CACHE_TAG
]
)
;
$persister
=
new
AppAdministrationSnippetPersister
(
$this
->
getAppAdministrationSnippetRepository
(
...
$snippetData
)
,
$this
->
getLocaleRepository
(
$localeData
)
,
$cacheInvalidator
)
;
$persister
->
updateSnippets
(
$appEntity
,
$snippets
, Context::
createDefaultContext
(
)
)
;
}
/** * @dataProvider persisterExceptionDataProvider * * @param array<mixed> $localeData * @param array<string, string> $snippets */