Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
MyAnnotatedCommand example
$command
=
new
MyCommand
(
)
;
$this
->
assertSame
(
'my:command',
$command
->
getName
(
)
)
;
$this
->
assertSame
(
'This is a command I wrote all by myself',
$command
->
getDescription
(
)
)
;
}
public
function
testAttributeOverridesProperty
(
)
{
$this
->
assertSame
(
'my:command', MyAnnotatedCommand::
getDefaultName
(
)
)
;
$this
->
assertSame
(
'This is a command I wrote all by myself', MyAnnotatedCommand::
getDefaultDescription
(
)
)
;
$command
=
new
MyAnnotatedCommand
(
)
;
$this
->
assertSame
(
'my:command',
$command
->
getName
(
)
)
;
$this
->
assertSame
(
'This is a command I wrote all by myself',
$command
->
getDescription
(
)
)
;
}
public
function
testDefaultCommand
(
)
{
$apl
=
new
Application
(
)
;
$apl
->
setDefaultCommand
(
Php8Command::
getDefaultName
(
)
)
;
$property
=
new
\
ReflectionProperty
(
$apl
, 'defaultCommand'
)
;