Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
RefreshAppCommand example
public
function
testRefreshWithLimitation
(
)
: void
{
$commandTester
=
new
CommandTester
(
$this
->
createCommand
(
__DIR__ . '/_fixtures'
)
)
;
$commandTester
->
execute
(
[
'-f' => true, '--no-validate' => true, 'name' =>
[
'validationFailure'
]
]
)
;
static
::
assertStringNotContainsString
(
'withPermissions',
$commandTester
->
getDisplay
(
)
)
;
static
::
assertStringNotContainsString
(
'withoutPermissions',
$commandTester
->
getDisplay
(
)
)
;
}
private
function
createCommand
(
string
$appFolder
)
: RefreshAppCommand
{
return
new
RefreshAppCommand
(
new
AppService
(
new
AppLifecycleIterator
(
$this
->
getContainer
(
)
->
get
(
'app.repository'
)
,
$this
->
getAppLoader
(
$appFolder
)
)
,
$this
->
getContainer
(
)
->
get
(
AppLifecycle::
class
)
)
,
new
AppPrinter
(
$this
->appRepository
)
,
$this
->
getContainer
(
)
->
get
(
ManifestValidator::
class
)
)
;
}
}