CommandTest

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

Class ConsoleTest

View source

# Protected Properties

# actionId

Type
string

View source

# command

Type
string

View source

# controller

Type
craft\console\Controller

View source

# currentIndex

Type
integer

View source

# desiredExitCode

Type
integer

View source

# eventChain

Type
array, craft\test\console\CommandTestItem

View source

# eventChainItemsHandled

Type
integer

View source

# expectedExitCode

Type
integer

View source

# hasExecuted

Type
boolean

View source

# ignoreStdOut

Type
boolean

View source

# parameters

Type
array

View source

# test

Type
craft\test\console\ConsoleTest

View source

# Public Methods

# __construct()

CommandTest constructor.

View source

Arguments

Throws

# confirm()

View source

Arguments

Returns

craft\test\console\CommandTest

# exitCode()

View source

Arguments

  • $value

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
  • $returnValue
  • $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

# 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
  • $type

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

Constant Description
CONFIRM
OUTPUT_COMMAND
PROMPT
SELECT
STD_ERR
STD_OUT