Retry
extends Assertion
in package
implements
GeneratedStep
Table of Contents
Interfaces
Constants
- DEFAULT_MAX_LENGTH = 200
- STACK_POSITION = 3
Properties
- $executed : mixed
- $action : string
- $arguments : array<string|int, mixed>
- $debugOutput : mixed
- $failed : mixed
- $file : mixed
- $isTry : mixed
- $line : mixed
- $metaStep : Meta
- $methodTemplate : mixed
- $prefix : mixed
- $retryInterval : mixed
- $retryNum : mixed
Methods
- __construct() : mixed
- __toString() : mixed
- getAction() : mixed
- getArguments() : mixed
- getArgumentsAsString() : mixed
- getFilePath() : mixed
- getHtml() : mixed
- getHumanizedActionWithoutArguments() : mixed
- getHumanizedArguments() : mixed
- getLine() : mixed
- getLineNumber() : mixed
- getMetaStep() : Meta
- getName() : mixed
- getPhpCode() : mixed
- getPrefix() : string
- getTemplate() : mixed
- hasFailed() : mixed
- run() : mixed
- saveTrace() : mixed
- setMetaStep() : mixed
- toString() : mixed
- addMetaStep() : mixed
- If steps are combined into one method they can be reproduced as meta-step.
- clean() : mixed
- formatClassName() : mixed
- getClassName() : mixed
- humanize() : mixed
- stringifyArgument() : mixed
- isTestFile() : mixed
Constants
DEFAULT_MAX_LENGTH
public
mixed
DEFAULT_MAX_LENGTH
= 200
STACK_POSITION
public
mixed
STACK_POSITION
= 3
Properties
$executed
public
mixed
$executed
= false
$action
protected
string
$action
$arguments
protected
array<string|int, mixed>
$arguments
$debugOutput
protected
mixed
$debugOutput
$failed
protected
mixed
$failed
= false
$file
protected
mixed
$file
= null
$isTry
protected
mixed
$isTry
= false
$line
protected
mixed
$line
= null
$metaStep
protected
Meta
$metaStep
= null
$methodTemplate
protected
static mixed
$methodTemplate
= <<<EOF
/**
* [!] Method is generated.
*
* {{doc}}
*
* Retry number and interval set by \$I->retry();
*
* @see \\{{module}}::{{method}}()
*/
public function {{action}}({{params}}) {
\$retryNum = isset(\$this->retryNum) ? \$this->retryNum : 1;
\$retryInterval = isset(\$this->retryInterval) ? \$this->retryInterval : 200;
return \$this->getScenario()->runStep(new \\Codeception\\Step\\Retry('{{method}}', func_get_args(), \$retryNum, \$retryInterval));
}
EOF
$prefix
protected
mixed
$prefix
= 'I'
$retryInterval
private
mixed
$retryInterval
$retryNum
private
mixed
$retryNum
Methods
__construct()
public
__construct(mixed $action, array<string|int, mixed> $arguments, mixed $retryNum, mixed $retryInterval) : mixed
Parameters
- $action : mixed
- $arguments : array<string|int, mixed>
- $retryNum : mixed
- $retryInterval : mixed
__toString()
public
__toString() : mixed
getAction()
public
getAction() : mixed
getArguments()
public
getArguments() : mixed
getArgumentsAsString()
public
getArgumentsAsString([mixed $maxLength = self::DEFAULT_MAX_LENGTH ]) : mixed
Parameters
- $maxLength : mixed = self::DEFAULT_MAX_LENGTH
getFilePath()
public
getFilePath() : mixed
getHtml()
public
getHtml([mixed $highlightColor = '#732E81' ]) : mixed
Parameters
- $highlightColor : mixed = '#732E81'
getHumanizedActionWithoutArguments()
public
getHumanizedActionWithoutArguments() : mixed
getHumanizedArguments()
public
getHumanizedArguments([mixed $maxLength = self::DEFAULT_MAX_LENGTH ]) : mixed
Parameters
- $maxLength : mixed = self::DEFAULT_MAX_LENGTH
getLine()
public
getLine() : mixed
Tags
getLineNumber()
public
getLineNumber() : mixed
getMetaStep()
public
getMetaStep() : Meta
Return values
MetagetName()
public
getName() : mixed
getPhpCode()
public
getPhpCode(mixed $maxLength) : mixed
Parameters
- $maxLength : mixed
getPrefix()
public
getPrefix() : string
Return values
stringgetTemplate()
public
static getTemplate(Template $template) : mixed
Parameters
- $template : Template
hasFailed()
public
hasFailed() : mixed
run()
public
run([ModuleContainer $container = null ]) : mixed
Parameters
- $container : ModuleContainer = null
saveTrace()
public
saveTrace() : mixed
setMetaStep()
public
setMetaStep(Meta $metaStep) : mixed
Parameters
- $metaStep : Meta
toString()
public
toString(mixed $maxLength) : mixed
Parameters
- $maxLength : mixed
addMetaStep()
If steps are combined into one method they can be reproduced as meta-step.
protected
addMetaStep(mixed $step, mixed $stack) : mixed
We are using stack trace to analyze if steps were called from test, if not - they were called from meta-step.
Parameters
- $step : mixed
- $stack : mixed
clean()
protected
clean(mixed $text) : mixed
Parameters
- $text : mixed
formatClassName()
protected
formatClassName(mixed $classname) : mixed
Parameters
- $classname : mixed
getClassName()
protected
getClassName(mixed $argument) : mixed
Parameters
- $argument : mixed
humanize()
protected
humanize(mixed $text) : mixed
Parameters
- $text : mixed
stringifyArgument()
protected
stringifyArgument(mixed $argument) : mixed
Parameters
- $argument : mixed
isTestFile()
private
isTestFile(mixed $file) : mixed
Parameters
- $file : mixed