ExampleNode
in package
implements
ScenarioInterface
Represents Gherkin Outline Example.
Tags
Table of Contents
Interfaces
- ScenarioInterface
- Gherkin scenario interface.
Properties
- $line : int
- $outlineSteps : array<string|int, StepNode>
- $outlineTitle : string
- $steps : null|array<string|int, StepNode>
- $tags : array<string|int, string>
- $title : string
- $tokens : array<string|int, string>
Methods
- __construct() : mixed
- Initializes outline.
- getKeyword() : string
- Returns node keyword.
- getLine() : int
- Returns outline declaration line number.
- getNodeType() : string
- Returns node type string
- getOutlineTitle() : string
- Returns outline title.
- getSteps() : array<string|int, StepNode>
- Returns outline steps.
- getTags() : array<string|int, string>
- Returns outline tags (including inherited from feature).
- getTitle() : string
- Returns example title.
- getTokens() : array<string|int, string>
- Returns example tokens.
- hasSteps() : bool
- Checks if outline has steps.
- hasTag() : bool
- Checks if outline is tagged with tag.
- hasTags() : bool
- Checks if outline has tags (both inherited from feature and own).
- createExampleSteps() : array<string|int, StepNode>
- Creates steps for this example from abstract outline steps.
- replaceArgumentsTokens() : array<string|int, ArgumentInterface>
- Replaces tokens in arguments with row values.
- replacePyStringArgumentTokens() : PyStringNode
- Replaces tokens in PyString with row values.
- replaceTableArgumentTokens() : TableNode
- Replaces tokens in table with row values.
- replaceTextTokens() : string
- Replaces tokens in text with row values.
Properties
$line
private
int
$line
$outlineSteps
private
array<string|int, StepNode>
$outlineSteps
$outlineTitle
private
string
$outlineTitle
$steps
private
null|array<string|int, StepNode>
$steps
$tags
private
array<string|int, string>
$tags
$title
private
string
$title
$tokens
private
array<string|int, string>
$tokens
Methods
__construct()
Initializes outline.
public
__construct(string $title, array<string|int, string> $tags, array<string|int, StepNode> $outlineSteps, array<string|int, string> $tokens, int $line[, string|null $outlineTitle = null ]) : mixed
Parameters
- $title : string
- $tags : array<string|int, string>
- $outlineSteps : array<string|int, StepNode>
- $tokens : array<string|int, string>
- $line : int
- $outlineTitle : string|null = null
getKeyword()
Returns node keyword.
public
getKeyword() : string
Return values
stringgetLine()
Returns outline declaration line number.
public
getLine() : int
Return values
intgetNodeType()
Returns node type string
public
getNodeType() : string
Return values
stringgetOutlineTitle()
Returns outline title.
public
getOutlineTitle() : string
Return values
stringgetSteps()
Returns outline steps.
public
getSteps() : array<string|int, StepNode>
Return values
array<string|int, StepNode>getTags()
Returns outline tags (including inherited from feature).
public
getTags() : array<string|int, string>
Return values
array<string|int, string>getTitle()
Returns example title.
public
getTitle() : string
Return values
stringgetTokens()
Returns example tokens.
public
getTokens() : array<string|int, string>
Return values
array<string|int, string>hasSteps()
Checks if outline has steps.
public
hasSteps() : bool
Return values
boolhasTag()
Checks if outline is tagged with tag.
public
hasTag(string $tag) : bool
Parameters
- $tag : string
Return values
boolhasTags()
Checks if outline has tags (both inherited from feature and own).
public
hasTags() : bool
Return values
boolcreateExampleSteps()
Creates steps for this example from abstract outline steps.
protected
createExampleSteps() : array<string|int, StepNode>
Return values
array<string|int, StepNode>replaceArgumentsTokens()
Replaces tokens in arguments with row values.
protected
replaceArgumentsTokens(array<string|int, ArgumentInterface> $arguments) : array<string|int, ArgumentInterface>
Parameters
- $arguments : array<string|int, ArgumentInterface>
Return values
array<string|int, ArgumentInterface>replacePyStringArgumentTokens()
Replaces tokens in PyString with row values.
protected
replacePyStringArgumentTokens(PyStringNode $argument) : PyStringNode
Parameters
- $argument : PyStringNode
Return values
PyStringNodereplaceTableArgumentTokens()
Replaces tokens in table with row values.
protected
replaceTableArgumentTokens(TableNode $argument) : TableNode
Parameters
- $argument : TableNode
Return values
TableNodereplaceTextTokens()
Replaces tokens in text with row values.
protected
replaceTextTokens(string $text) : string
Parameters
- $text : string