src/Behat/Behat/Output/Node/Printer/Pretty/PrettyExampleRowPrinter.php
private function getWrapperClosure(OutlineNode $outline, ExampleNode $example, array $stepEvents)
    {
        $resultConverter = $this->resultConverter;

        return function ($value, $column) use ($outline, $example, $stepEvents, $resultConverter) {
            $results = array();
            foreach ($stepEvents as $event) {
                $index = array_search($event->getStep(), $example->getSteps());
                $header = $outline->getExampleTable()->getRow(0);
                $steps = $outline->getSteps();
                $outlineStepText = $steps[$index]->getText();

                if (false !== strpos($outlineStepText, '<' . $header[$column] . '>')) {
                    $results[] = $event->getTestResult();
                }
            }

            $result = new TestResults($results);
            $style = $resultConverter->convertResultToString($result);

            return sprintf('{+%s}%s{-%s}', $style, $value, $style);
        };
    }
private function getWrapperClosure(OutlineNode $outline, ExampleNode $example, array $stepEvents)
    {
        $resultConverter = $this->resultConverter;

        return function ($value, $column) use ($outline, $example, $stepEvents, $resultConverter) {
            $results = array();
            foreach ($stepEvents as $event) {
                $index = array_search($event->getStep(), $example->getSteps());
                $header = $outline->getExampleTable()->getRow(0);
                $steps = $outline->getSteps();
                $outlineStepText = $steps[$index]->getText();

                if (false !== strpos($outlineStepText, '<' . $header[$column] . '>')) {
                    $results[] = $event->getTestResult();
                }
            }

            $result = new TestResults($results);
            $style = $resultConverter->convertResultToString($result);

            return sprintf('{+%s}%s{-%s}', $style, $value, $style);
        };
    }
private function getWrapperClosure ( OutlineNode $ outline , ExampleNode $ example , array $ stepEvents ) { $ resultConverter = $ this -> resultConverter ; return function ( $ value , $ column ) use ( $ outline , $ example , $ stepEvents , $ resultConverter ) { $ results = array ( ) ; foreach ( $ stepEvents as $ event ) { $ index = array_search ( $ event -> getStep ( ) , $ example -> getSteps ( ) ) ; $ header = $ outline -> getExampleTable ( ) -> getRow ( 0 ) ; $ steps = $ outline -> getSteps ( ) ; $ outlineStepText = $ steps [ $ index ] -> getText ( ) ; if ( false !== strpos ( $ outlineStepText , '<' . $ header [ $ column ] . '>' ) ) { $ results [ ] = $ event -> getTestResult ( ) ; } } $ result = new TestResults ( $ results ) ; $ style = $ resultConverter -> convertResultToString ( $ result ) ; return sprintf ( '{+%s}%s{-%s}' , $ style , $ value , $ style ) ; } ; }
Creates wrapper-closure for the example table.

@param OutlineNode   $outline
@param ExampleNode   $example
@param AfterStepTested[] $stepEvents

@return callable
Creates wrapper - closure for the example table .