Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
refreshExtensions example
public
function
testRefreshExtensions
(
)
: void
{
$controller
=
new
ExtensionStoreActionsController
(
$this
->
createMock
(
ExtensionLifecycleService::
class
)
,
$this
->
createMock
(
ExtensionDownloader::
class
)
,
$pluginService
=
$this
->
createMock
(
PluginService::
class
)
,
$this
->
createMock
(
PluginManagementService::
class
)
)
;
$pluginService
->
expects
(
static
::
once
(
)
)
->
method
(
'refreshPlugins'
)
;
static
::
assertInstanceOf
(
Response::
class
,
$controller
->
refreshExtensions
(
Context::
createDefaultContext
(
)
)
)
;
}
public
function
testUploadExtensionsWithInvalidFile
(
)
: void
{
$controller
=
new
ExtensionStoreActionsController
(
$this
->
createMock
(
ExtensionLifecycleService::
class
)
,
$this
->
createMock
(
ExtensionDownloader::
class
)
,
$this
->
createMock
(
PluginService::
class
)
,
$this
->
createMock
(
PluginManagementService::
class
)
)
;