Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
RequirementsValidator example
$pluginRepo
=
$this
->
createMock
(
EntityRepository::
class
)
;
$pluginRepo
->
method
(
'search'
)
->
willReturn
(
new
EntitySearchResult
(
'plugin',
0,
new
PluginCollection
(
)
,
null,
new
Criteria
(
)
,
Context::
createDefaultContext
(
)
)
)
;
return
new
RequirementsValidator
(
$pluginRepo
,
$this
->projectDir
)
;
}
private
function
createPlugin
(
string
$path
)
: PluginEntity
{
$plugin
=
new
PluginEntity
(
)
;
$plugin
->
setPath
(
$path
)
;
$plugin
->
setManagedByComposer
(
false
)
;
$plugin
->
setVersion
(
'1.0.0'
)
;