src/Behat/Behat/Snippet/SnippetWriter.php
public function printUndefinedSteps(SnippetPrinter $printer, array $undefinedSteps)
    {
        $printableSteps = array();
        foreach ($undefinedSteps as $undefinedStep) {
            $suiteName = $undefinedStep->getEnvironment()->getSuite()->getName();
            $step = $undefinedStep->getStep();

            if (!isset($printableSteps[$suiteName])) {
                $printableSteps[$suiteName] = array();
            }

            $printableSteps[$suiteName][$step->getText()] = $step;
        }

        foreach ($printableSteps as $suiteName => $steps) {
            $printer->printUndefinedSteps($suiteName, array_values($steps));
        }
    }
public function printUndefinedSteps(SnippetPrinter $printer, array $undefinedSteps)
    {
        $printableSteps = array();
        foreach ($undefinedSteps as $undefinedStep) {
            $suiteName = $undefinedStep->getEnvironment()->getSuite()->getName();
            $step = $undefinedStep->getStep();

            if (!isset($printableSteps[$suiteName])) {
                $printableSteps[$suiteName] = array();
            }

            $printableSteps[$suiteName][$step->getText()] = $step;
        }

        foreach ($printableSteps as $suiteName => $steps) {
            $printer->printUndefinedSteps($suiteName, array_values($steps));
        }
    }
public function printUndefinedSteps ( SnippetPrinter $ printer , array $ undefinedSteps ) { $ printableSteps = array ( ) ; foreach ( $ undefinedSteps as $ undefinedStep ) { $ suiteName = $ undefinedStep -> getEnvironment ( ) -> getSuite ( ) -> getName ( ) ; $ step = $ undefinedStep -> getStep ( ) ; if ( ! isset ( $ printableSteps [ $ suiteName ] ) ) { $ printableSteps [ $ suiteName ] = array ( ) ; } $ printableSteps [ $ suiteName ] [ $ step -> getText ( ) ] = $ step ; } foreach ( $ printableSteps as $ suiteName => $ steps ) { $ printer -> printUndefinedSteps ( $ suiteName , array_values ( $ steps ) ) ; } }
Prints undefined steps using provided printer.

@param SnippetPrinter  $printer
@param UndefinedStep[] $undefinedSteps
Prints undefined steps using provided printer .