Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
BaseSnippetSet example
public
function
testLoadBaseSnippetsFromPlugin
(
)
: void
{
$connection
=
$this
->
createMock
(
Connection::
class
)
;
$connection
->
expects
(
static
::
once
(
)
)
->
method
(
'fetchAllKeyValue'
)
->
willReturn
(
[
BaseSnippetSet::
class
=>
'Plugin Manufacturer',
]
)
;
$kernel
=
new
MockedKernel
(
[
'BaseSnippetSet' =>
new
BaseSnippetSet
(
true, __DIR__
)
,
]
)
;
$collection
=
new
SnippetFileCollection
(
)
;
$snippetFileLoader
=
new
SnippetFileLoader
(
$kernel
,
$connection
,
$this
->
createMock
(
AppSnippetFileLoader::
class
)
,
new
ActiveAppsLoader
(
$this
->
createMock
(
Connection::
class
)
,