Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getArrayInput example
protected
function
setUp
(
)
: void
{
$this
->connection =
$this
->
getContainer
(
)
->
get
(
Connection::
class
)
;
$this
->customerRepository =
$this
->
getContainer
(
)
->
get
(
'customer.repository'
)
;
$this
->
clearTable
(
'cart'
)
;
$this
->
clearTable
(
'customer'
)
;
}
public
function
testCommandWithoutArguments
(
)
: void
{
$this
->
expectException
(
\InvalidArgumentException::
class
)
;
$this
->
getCommand
(
)
->
run
(
$this
->
getArrayInput
(
)
,
new
BufferedOutput
(
)
)
;
}
public
function
testCommandWithInvalidArguments
(
)
: void
{
$input
=
new
ArrayInput
(
[
'type' => 'foo'
]
,
$this
->
createInputDefinition
(
)
)
;
$this
->
expectException
(
\InvalidArgumentException::
class
)
;
$this
->
getCommand
(
)
->
run
(
$input
,
new
BufferedOutput
(
)
)
;
}
public
function
testCommandRemovesGuest
(
)
: void
{