Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createBundleMock example
$bundle
=
$this
->
createMock
(
BundleInterface::
class
)
;
$kernel
=
$this
->
getKernel
(
[
$bundle
]
, true
)
;
$application
=
new
Application
(
$kernel
)
;
$application
->
doRun
(
new
ArrayInput
(
[
'list'
]
)
,
new
NullOutput
(
)
)
;
}
public
function
testBundleCommandsAreRegistered
(
)
{
$bundle
=
$this
->
createBundleMock
(
[
]
)
;
$kernel
=
$this
->
getKernel
(
[
$bundle
]
, true
)
;
$application
=
new
Application
(
$kernel
)
;
$application
->
doRun
(
new
ArrayInput
(
[
'list'
]
)
,
new
NullOutput
(
)
)
;
// Calling twice: registration should only be done once.
$application
->
doRun
(
new
ArrayInput
(
[
'list'
]
)
,
new
NullOutput
(
)
)
;
}
public
function
testBundleCommandsAreRetrievable
(
)
{