CommandTest

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

Class ConsoleTest

View source (opens new window)

# Protected Properties

# actionId

Type
string (opens new window)
Default value
null

View source (opens new window)

# command

Type
string (opens new window)
Default value
null

View source (opens new window)

# controller

Type
craft\console\Controller
Default value
null

View source (opens new window)

# currentIndex

Type
integer (opens new window)
Default value
null

View source (opens new window)

# desiredExitCode

Type
integer (opens new window)
Default value
null

View source (opens new window)

# eventChain

Type
array (opens new window), craft\test\console\CommandTestItem
Default value
[]

View source (opens new window)

# eventChainItemsHandled

Type
integer (opens new window)
Default value
null

View source (opens new window)

# expectedExitCode

Type
integer (opens new window)
Default value
null

View source (opens new window)

# hasExecuted

Type
boolean (opens new window)
Default value
false

View source (opens new window)

# ignoreStdOut

Type
boolean (opens new window)
Default value
false

View source (opens new window)

# parameters

Type
array (opens new window)
Default value
null

View source (opens new window)

# test

Type
craft\test\console\ConsoleTest
Default value
null

View source (opens new window)

# Public Methods

# __construct()

CommandTest constructor.

View source (opens new window)

Arguments

Throws

# confirm()

View source (opens new window)

Arguments

Returns

craft\test\console\CommandTest

# exitCode()

View source (opens new window)

Arguments

  • $value

Returns

craft\test\console\CommandTest

# outputCommand()

View source (opens new window)

Arguments

Returns

craft\test\console\CommandTest

# prompt()

View source (opens new window)

Arguments

Returns

craft\test\console\CommandTest

# run()

View source (opens new window)

Throws

# select()

View source (opens new window)

Arguments

Returns

craft\test\console\CommandTest

# stdOut()

View source (opens new window)

Arguments

Returns

craft\test\console\CommandTest

# stderr()

View source (opens new window)

Arguments

Returns

craft\test\console\CommandTest

# Protected Methods

# addEventChainItem()

View source (opens new window)

Arguments

Returns

craft\test\console\CommandTest

# confirmHandler()

View source (opens new window)

Returns

Closure (opens new window)

# getNextItem()

View source (opens new window)

Returns

craft\test\console\CommandTestItem, null (opens new window)

# outputCommandHandler()

View source (opens new window)

Returns

Closure (opens new window)

# promptHandler()

View source (opens new window)

Returns

Closure (opens new window)

# runHandlerCheck()

View source (opens new window)

Arguments

  • $out
  • $type

Returns

craft\test\console\CommandTestItem

# selectHandler()

View source (opens new window)

Returns

Closure (opens new window)

# setupController()

View source (opens new window)

Throws

# stdOutHandler()

View source (opens new window)

Returns

Closure (opens new window)

# stderrHandler()

View source (opens new window)

Returns

Closure (opens new window)

# Constants

Constant Description
CONFIRM
OUTPUT_COMMAND
PROMPT
SELECT
STD_ERR
STD_OUT