PHP Class Behat\Gherkin\Keywords\KeywordsDumper

Author: Konstantin Kudryashov ([email protected])
Exibir arquivo Open project: behat/gherkin Class Usage Examples

Public Methods

Method Description
__construct ( KeywordsInterface $keywords ) Initializes dumper.
dump ( string $language, boolean $short = true, boolean $excludeAsterisk = false ) : string | array Dumps keyworded feature into string.
dumpKeywords ( array $keywords, boolean $isShort ) : string Defaults keywords dumper.
setKeywordsDumperFunction ( callable $mapper ) Sets keywords mapper function.

Protected Methods

Method Description
dumpBackground ( string $keyword, boolean $short = true, $excludeAsterisk = false ) : string Dumps background example.
dumpFeature ( string $keyword, boolean $short = true, $excludeAsterisk = false ) : string Dumps feature example.
dumpOutline ( string $keyword, boolean $short = true, $excludeAsterisk = false ) : string Dumps outline example.
dumpScenario ( string $keyword, boolean $short = true, $excludeAsterisk = false ) : string Dumps scenario example.
dumpStep ( string $keywords, string $text, boolean $short = true, $excludeAsterisk = false ) : string Dumps step example.

Method Details

__construct() public method

Initializes dumper.
public __construct ( KeywordsInterface $keywords )
$keywords KeywordsInterface Keywords instance

dump() public method

Dumps keyworded feature into string.
public dump ( string $language, boolean $short = true, boolean $excludeAsterisk = false ) : string | array
$language string Keywords language
$short boolean Dump short version
$excludeAsterisk boolean
return string | array String for short version and array of features for extended

dumpBackground() protected method

Dumps background example.
protected dumpBackground ( string $keyword, boolean $short = true, $excludeAsterisk = false ) : string
$keyword string Item keyword
$short boolean Dump short version?
return string

dumpFeature() protected method

Dumps feature example.
protected dumpFeature ( string $keyword, boolean $short = true, $excludeAsterisk = false ) : string
$keyword string Item keyword
$short boolean Dump short version?
return string

dumpKeywords() public method

Defaults keywords dumper.
public dumpKeywords ( array $keywords, boolean $isShort ) : string
$keywords array Keywords list
$isShort boolean Is short version
return string

dumpOutline() protected method

Dumps outline example.
protected dumpOutline ( string $keyword, boolean $short = true, $excludeAsterisk = false ) : string
$keyword string Item keyword
$short boolean Dump short version?
return string

dumpScenario() protected method

Dumps scenario example.
protected dumpScenario ( string $keyword, boolean $short = true, $excludeAsterisk = false ) : string
$keyword string Item keyword
$short boolean Dump short version?
return string

dumpStep() protected method

Dumps step example.
protected dumpStep ( string $keywords, string $text, boolean $short = true, $excludeAsterisk = false ) : string
$keywords string Item keyword
$text string Step text
$short boolean Dump short version?
return string

setKeywordsDumperFunction() public method

Callable should accept 2 arguments (array $keywords and Boolean $isShort)
public setKeywordsDumperFunction ( callable $mapper )
$mapper callable Mapper function