Behat\Gherkin\Keywords\KeywordsDumper::dumpOutline PHP Method

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
    protected function dumpOutline($keyword, $short = true, $excludeAsterisk = false)
    {
        $dump = <<<GHERKIN
  {$keyword}: Erasing other agents' memory

GHERKIN;
        // Given
        $dump .= $this->dumpStep($this->keywords->getGivenKeywords(), 'there is agent <agent1>', $short, $excludeAsterisk);
        // And
        $dump .= $this->dumpStep($this->keywords->getAndKeywords(), 'there is agent <agent2>', $short, $excludeAsterisk);
        // When
        $dump .= $this->dumpStep($this->keywords->getWhenKeywords(), 'I erase agent <agent2>\'s memory', $short, $excludeAsterisk);
        // Then
        $dump .= $this->dumpStep($this->keywords->getThenKeywords(), 'there should be agent <agent1>', $short, $excludeAsterisk);
        // But
        $dump .= $this->dumpStep($this->keywords->getButKeywords(), 'there should not be agent <agent2>', $short, $excludeAsterisk);
        $keywords = explode('|', $this->keywords->getExamplesKeywords());
        if ($short) {
            $keyword = call_user_func($this->keywordsDumper, $keywords, $short);
        } else {
            $keyword = call_user_func($this->keywordsDumper, array($keywords[0]), $short);
        }
        $dump .= <<<GHERKIN

    {$keyword}:
      | agent1 | agent2 |
      | D      | M      |

GHERKIN;
        return $dump . "\n";
    }