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() | |
stderr() | |
stdout() |
__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
(integer)
Returns ​
craft\test\console\CommandTest
outputCommand()
​
Arguments ​
Returns ​
craft\test\console\CommandTest
prompt()
​
Arguments ​
Returns ​
craft\test\console\CommandTest
run()
​
Throws ​
select()
​
Arguments ​
Returns ​
craft\test\console\CommandTest
stderr()
​
Arguments ​
$desiredOutput
(iterable
, string)
Returns ​
craft\test\console\CommandTest
stdout()
​
Arguments ​
$desiredOutput
(iterable
, string)
Returns ​
craft\test\console\CommandTest
Protected Methods ​
Method | Description |
---|---|
addEventChainItem() | |
confirmHandler() | |
getNextItem() | |
outputCommandHandler() | |
promptHandler() | |
runHandlerCheck() | |
selectHandler() | |
setupController() | |
stderrHandler() | |
stdoutHandler() |
addEventChainItem()
​
Arguments ​
$config
(array)
Returns ​
craft\test\console\CommandTest
confirmHandler()
​
Returns ​
getNextItem()
​
Returns ​
craft\test\console\CommandTestItem, null
outputCommandHandler()
​
Returns ​
promptHandler()
​
Returns ​
runHandlerCheck()
​
Arguments ​
Returns ​
craft\test\console\CommandTestItem
selectHandler()
​
Returns ​
setupController()
​
Throws ​
stderrHandler()
​
Returns ​
stdoutHandler()
​
Returns ​
Constants ​
Constant | Description |
---|---|
CONFIRM | |
OUTPUT_COMMAND | |
PROMPT | |
SELECT | |
STD_ERR | |
STD_OUT |