src/Behat/Behat/Output/Node/Printer/Pretty/PrettyPathPrinter.php
public function printScenarioPath(Formatter $formatter, FeatureNode $feature, Scenario $scenario, $indentation)
    {
        $printer = $formatter->getOutputPrinter();

        if (!$formatter->getParameter('paths')) {
            $printer->writeln();

            return;
        }

        $fileAndLine = sprintf('%s:%s', $this->relativizePaths($feature->getFile()), $scenario->getLine());
        $headerWidth = $this->widthCalculator->calculateScenarioHeaderWidth($scenario, $indentation);
        $scenarioWidth = $this->widthCalculator->calculateScenarioWidth($scenario, $indentation, 2);
        $spacing = str_repeat(' ', max(0, $scenarioWidth - $headerWidth));

        $printer->writeln(sprintf('%s {+comment}# %s{-comment}', $spacing, $fileAndLine));
    }
public function printScenarioPath(Formatter $formatter, FeatureNode $feature, Scenario $scenario, $indentation)
    {
        $printer = $formatter->getOutputPrinter();

        if (!$formatter->getParameter('paths')) {
            $printer->writeln();

            return;
        }

        $fileAndLine = sprintf('%s:%s', $this->relativizePaths($feature->getFile()), $scenario->getLine());
        $headerWidth = $this->widthCalculator->calculateScenarioHeaderWidth($scenario, $indentation);
        $scenarioWidth = $this->widthCalculator->calculateScenarioWidth($scenario, $indentation, 2);
        $spacing = str_repeat(' ', max(0, $scenarioWidth - $headerWidth));

        $printer->writeln(sprintf('%s {+comment}# %s{-comment}', $spacing, $fileAndLine));
    }
public function printScenarioPath ( Formatter $ formatter , FeatureNode $ feature , Scenario $ scenario , $ indentation ) { $ printer = $ formatter -> getOutputPrinter ( ) ; if ( ! $ formatter -> getParameter ( 'paths' ) ) { $ printer -> writeln ( ) ; return ; } $ fileAndLine = sprintf ( '%s:%s' , $ this -> relativizePaths ( $ feature -> getFile ( ) ) , $ scenario -> getLine ( ) ) ; $ headerWidth = $ this -> widthCalculator -> calculateScenarioHeaderWidth ( $ scenario , $ indentation ) ; $ scenarioWidth = $ this -> widthCalculator -> calculateScenarioWidth ( $ scenario , $ indentation , 2 ) ; $ spacing = str_repeat ( ' ' , max ( 0 , $ scenarioWidth - $ headerWidth ) ) ; $ printer -> writeln ( sprintf ( '%s {+comment}# %s{-comment}' , $ spacing , $ fileAndLine ) ) ; }
Prints scenario path comment.

@param Formatter   $formatter
@param FeatureNode $feature
@param Scenario    $scenario
@param integer     $indentation
Prints scenario path comment .