Skip to content

CommandTest ​

Type
Class
Namespace
craft\test\console
Inherits
craft\test\console\CommandTest
Since
3.2.0

Class ConsoleTest

View source

Protected Properties ​

PropertyDescription
actionIdstring
commandstring
controllercraft\console\Controller
currentIndexinteger
desiredExitCodeinteger
eventChainarray, craft\test\console\CommandTestItem
eventChainItemsHandledinteger
expectedExitCodeinteger
hasExecutedboolean
ignoreStdOutboolean
parametersarray
testcraft\test\console\ConsoleTest

actionId ​

Type
string
Default value
null

View source

command ​

Type
string
Default value
null

View source

controller ​

Type
craft\console\Controller
Default value
null

View source

currentIndex ​

Type
integer
Default value
null

View source

desiredExitCode ​

Type
integer
Default value
null

View source

eventChain ​

Type
array, craft\test\console\CommandTestItem
Default value
[]

View source

eventChainItemsHandled ​

Type
integer
Default value
0

View source

expectedExitCode ​

Type
integer
Default value
null

View source

hasExecuted ​

Type
boolean
Default value
false

View source

ignoreStdOut ​

Type
boolean
Default value
false

View source

parameters ​

Type
array
Default value
null

View source

test ​

Type
craft\test\console\ConsoleTest
Default value
null

View source

Public Methods ​

MethodDescription
__construct()CommandTest constructor.
confirm()
exitCode()
outputCommand()
prompt()
run()
select()
stdOut()
stderr()

__construct() ​

CommandTest constructor.

View source

Arguments ​

Throws ​

confirm() ​

View source

Arguments ​

Returns ​

craft\test\console\CommandTest

exitCode() ​

View source

Arguments ​

  • $value (mixed)

Returns ​

craft\test\console\CommandTest

outputCommand() ​

View source

Arguments ​

Returns ​

craft\test\console\CommandTest

prompt() ​

View source

Arguments ​

Returns ​

craft\test\console\CommandTest

run() ​

View source

Throws ​

select() ​

View source

Arguments ​

  • $prompt (mixed)
  • $returnValue (mixed)
  • $options (array)

Returns ​

craft\test\console\CommandTest

stdOut() ​

View source

Arguments ​

Returns ​

craft\test\console\CommandTest

stderr() ​

View source

Arguments ​

Returns ​

craft\test\console\CommandTest

Protected Methods ​

MethodDescription
addEventChainItem()
confirmHandler()
getNextItem()
outputCommandHandler()
promptHandler()
runHandlerCheck()
selectHandler()
setupController()
stdOutHandler()
stderrHandler()

addEventChainItem() ​

View source

Arguments ​

Returns ​

craft\test\console\CommandTest

confirmHandler() ​

View source

Returns ​

Closure

getNextItem() ​

View source

Returns ​

craft\test\console\CommandTestItem, null

outputCommandHandler() ​

View source

Returns ​

Closure

promptHandler() ​

View source

Returns ​

Closure

runHandlerCheck() ​

View source

Arguments ​

  • $out (mixed)
  • $type (mixed)

Returns ​

craft\test\console\CommandTestItem

selectHandler() ​

View source

Returns ​

Closure

setupController() ​

View source

Throws ​

stdOutHandler() ​

View source

Returns ​

Closure

stderrHandler() ​

View source

Returns ​

Closure

Constants ​

ConstantDescription
CONFIRM
OUTPUT_COMMAND
PROMPT
SELECT
STD_ERR
STD_OUT