Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
UserConfigCollection example
$context
= Context::
createDefaultContext
(
new
AdminApiSource
(
'user-id'
)
)
;
$userConfig
=
new
UserConfigEntity
(
)
;
$userConfig
->
setUniqueIdentifier
(
'user-config-id'
)
;
$userConfig
->
setValue
(
[
'frwUserToken' => 'frw-user-token',
]
)
;
$result
=
new
EntitySearchResult
(
UserConfigDefinition::ENTITY_NAME,
1,
new
UserConfigCollection
(
[
$userConfig
]
)
,
null,
new
Criteria
(
)
,
$context
)
;
$userConfigRepositoryMock
=
static
::
createMock
(
EntityRepository::
class
)
;
$userConfigRepositoryMock
->
expects
(
static
::
once
(
)
)
->
method
(
'search'
)
->
willReturn
(
$result
)
;
$innerOptionsProvider
=
static
::
createMock
(
AbstractStoreRequestOptionsProvider::
class
)
;