CommandTest ​
- Type
- Class
- Namespace
- craft\test\console
- Inherits
- craft\test\console\CommandTest
- Since
- 3.2.0
Class ConsoleTest
Protected Properties ​
actionId
​
- Type
- string
- Default value
null
command
​
- Type
- string
- Default value
null
controller
​
- Type
- craft\console\Controller
- Default value
null
currentIndex
​
- Type
- integer
- Default value
null
desiredExitCode
​
- Type
- integer
- Default value
null
eventChain
​
- Type
- array, craft\test\console\CommandTestItem
- Default value
[]
eventChainItemsHandled
​
- Type
- integer
- Default value
0
expectedExitCode
​
- Type
- integer
- Default value
null
hasExecuted
​
- Type
- boolean
- Default value
false
ignoreStdOut
​
- Type
- boolean
- Default value
false
parameters
​
- Type
- array
- Default value
null
test
​
- Type
- craft\test\console\ConsoleTest
- Default value
null
Public Methods ​
Method | Description |
---|---|
__construct() | CommandTest constructor. |
confirm() | |
exitCode() | |
outputCommand() | |
prompt() | |
run() | |
select() | |
stdOut() | |
stderr() |
__construct()
​
CommandTest constructor.
Arguments ​
$consoleTest
(craft\test\console\ConsoleTest)$command
(string)$parameters
(array)$ignoreStdOut
(boolean)
Throws ​
confirm()
​
Arguments ​
Returns ​
craft\test\console\CommandTest
exitCode()
​
Arguments ​
$value
(mixed
)
Returns ​
craft\test\console\CommandTest
outputCommand()
​
Arguments ​
$desiredOutput
(string, string[], Traversable)$withScriptName
(boolean)
Returns ​
craft\test\console\CommandTest
prompt()
​
Arguments ​
Returns ​
craft\test\console\CommandTest
run()
​
Throws ​
select()
​
Arguments ​
$prompt
(mixed
)$returnValue
(mixed
)$options
(array)
Returns ​
craft\test\console\CommandTest
stdOut()
​
Arguments ​
$desiredOutput
(string, string[], Traversable)
Returns ​
craft\test\console\CommandTest
stderr()
​
Arguments ​
$desiredOutput
(string, string[], Traversable)
Returns ​
craft\test\console\CommandTest
Protected Methods ​
Method | Description |
---|---|
addEventChainItem() | |
confirmHandler() | |
getNextItem() | |
outputCommandHandler() | |
promptHandler() | |
runHandlerCheck() | |
selectHandler() | |
setupController() | |
stdOutHandler() | |
stderrHandler() |
addEventChainItem()
​
Arguments ​
$config
(array)
Returns ​
craft\test\console\CommandTest
confirmHandler()
​
Returns ​
getNextItem()
​
Returns ​
craft\test\console\CommandTestItem, null
outputCommandHandler()
​
Returns ​
promptHandler()
​
Returns ​
runHandlerCheck()
​
Arguments ​
$out
(mixed
)$type
(mixed
)
Returns ​
craft\test\console\CommandTestItem
selectHandler()
​
Returns ​
setupController()
​
Throws ​
stdOutHandler()
​
Returns ​
stderrHandler()
​
Returns ​
Constants ​
Constant | Description |
---|---|
CONFIRM | |
OUTPUT_COMMAND | |
PROMPT | |
SELECT | |
STD_ERR | |
STD_OUT |