Prints scenarios list.

@param OutputPrinter  $printer
@param string         $intro
@param integer        $resultCode
@param ScenarioStat[] $scenarioStats
551462
public function printScenariosList(OutputPrinter $printer, $intro, $resultCode, array $scenarioStats)
    {
        if (!count($scenarioStats)) {
            return;
        }

        $style = $this->resultConverter->convertResultCodeToString($resultCode);
        $intro = $this->translator->trans($intro, array(), 'output');

        $printer->writeln(sprintf('--- {+%s}%s{-%s}' . PHP_EOL, $style, $intro, $style));
        foreach ($scenarioStats as $stat) {
            $path = $this->relativizePaths((string) $stat);
            $printer->writeln(sprintf('    {+%s}%s{-%s}', $style, $path, $style));
        }

        $printer->writeln();
    }
1288816
private function printExampleRowOnAfterExampleEvent(Formatter $formatter, Event $event, $eventName)
    {
        if (!$event instanceof AfterScenarioTested || ExampleTested::AFTER !== $eventName) {
            return;
        }

        $example = $event->getScenario();

        $this->exampleSetupPrinter->printSetup($formatter, $this->exampleSetup);

        foreach ($this->stepBeforeTestedEvents as $beforeEvent) {
            $this->stepSetupPrinter->printSetup($formatter, $beforeEvent->getSetup());
        }

        $this->exampleRowPrinter->printExampleRow($formatter, $this->outline, $example, $this->stepAfterTestedEvents);

        foreach ($this->stepAfterTestedEvents as $afterEvent) {
            $this->stepSetupPrinter->printTeardown($formatter, $afterEvent->getTeardown());
        }

        $this->exampleSetupPrinter->printTeardown($formatter, $event->getTeardown());

        $this->exampleSetup = null;
        $this->stepBeforeTestedEvents = array();
        $this->stepAfterTestedEvents = array();
    }
67057
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));
    }
749016
private function printSetupHookCallResult(OutputPrinter $printer, CallResult $callResult)
    {
        if (!$callResult->hasStdOut() && !$callResult->hasException()) {
            return;
        }

        $resultCode = $callResult->hasException() ? TestResult::FAILED : TestResult::PASSED;
        $style = $this->resultConverter->convertResultCodeToString($resultCode);
        $hook = $callResult->getCall()->getCallee();
        $path = $hook->getPath();

        $printer->writeln(
            sprintf('%s┌─ {+%s}@%s{-%s} {+comment}# %s{-comment}', $this->indentText, $style, $hook, $style, $path)
        );

        $printer->writeln(sprintf('%s│', $this->indentText));

        $this->printHookCallStdOut($printer, $callResult, $this->indentText);
        $this->printHookCallException($printer, $callResult, $this->indentText);

        if ($this->newlineBefore) {
            $printer->writeln();
        }
    }
310081
protected function renderContents($output, array $matches, &$start): void
    {
        foreach ($matches[0] as $i => $match) {
            $end = $match[1] - $start;
            $contentType = $matches[2][$i][0];
            echo substr($output, $start, $end);
            $this->doRenderTags($contentType);
            $start = $match[1] + \strlen($match[0]);
        }
        echo substr($output, $start);
    }
1168180
public function render(OutputInterface $output, ResultCollection $results)
    {
        $output->writeln($this->getHeader());

        foreach ($results->toArray() as $result) {
            $output->writeln(implode(';', [ '"'.$result[0].'"', $result[1], $result[2], $result[3] ]));
        };
    }
1360035
private function printStepExceptionsAndStdOut(OutputPrinter $printer, array $events)
    {
        foreach ($events as $event) {
            $this->printStepStdOut($printer, $event->getTestResult());
            $this->printStepException($printer, $event->getTestResult());
        }
    }
553377
public void output(PrintWriter out)
    {
        Map<String, Entry> entries = config.getSortedEntries();
        
        if ( entries.isEmpty() )
        {
            return;
        }

        ColumnPrinter printer = build(entries);

        out.println("Configuration Details");
        printer.print(out);
    }
572839
public void printControlStartForm(PrintWriter out, int iPrintOptions)
    {
        super.printControlStartForm(out, iPrintOptions);
        
        BasePanel scrHeading = ((BaseGridScreen)this.getScreenField()).getReportHeading();
        if (scrHeading != null)
        {
            out.println(Utility.startTag(XMLTags.HEADING));
            scrHeading.printControl(out, iPrintOptions | HtmlConstants.HEADING_SCREEN);
            out.println(Utility.endTag(XMLTags.HEADING));
        }

        Record record = ((BaseGridScreen)this.getScreenField()).getMainRecord();
        if (record == null)
            return;
        String strRecordName = record.getTableNames(false);
        if ((strRecordName == null) || (strRecordName.length() == 0))
        	strRecordName = "Record";
        out.println(Utility.startTag(XMLTags.DETAIL + " name=\"" + strRecordName + "\""));
        this.printHeadingFootingControls(out, iPrintOptions | HtmlConstants.HEADING_SCREEN);
    }
354745
private void printResult(long totalTime) {
      // Platform
      summary.println("Running TCK on platform: " + platformDescription);
      summary.println();

      // Instantiator implementations
      summary.println("Instantiators used: ");
      summary.println("   Objenesis standard  : " + objenesisStandard.getInstantiatorOf(String.class).getClass().getName());
      summary.println("   Objenesis serializer: " + objenesisSerializer.getInstantiatorOf(String.class).getClass().getName());
      summary.println();

      Collection<String> candidateNames = new ArrayList<>();
      for(Map.Entry<Candidate, Map<Candidate.CandidateType, Result>> entry : results.entrySet()) {
         candidateNames.add(entry.getKey().getDescription());
      }

      int maxObjenesisWidth = "Objenesis serializer".length();
      int maxCandidateWidth = lengthOfLongestStringIn(candidateNames);

      // Strategy used
      summary.print(pad("", maxCandidateWidth) + ' ');
      summary.print(pad("Objenesis standard", maxObjenesisWidth) + ' ');
      summary.print(pad("Objenesis serializer", maxObjenesisWidth));
      summary.println();

      List<Result> exceptions = new ArrayList<>();

      // Candidates
      for(Map.Entry<Candidate, Map<Candidate.CandidateType, Result>> entry : results.entrySet()) {
         summary.print(pad(entry.getKey().getDescription(), maxCandidateWidth) + ' ');

         Result standardResult = entry.getValue().get(Candidate.CandidateType.STANDARD);
         Result serializationResult = entry.getValue().get(Candidate.CandidateType.SERIALIZATION);

         if(standardResult == null && serializationResult == null) {
            continue;
         }

         if(standardResult == null) {
            summary.print(pad("N/A", maxObjenesisWidth) + " ");
         }
         else {
            summary.print(pad(standardResult.result ? "Y" : "n", maxObjenesisWidth) + " ");

            if(standardResult.exception != null) {
               exceptions.add(standardResult);
            }
         }

         if(serializationResult == null) {
            summary.print(pad("N/A", maxObjenesisWidth));
         }
         else {
            summary.print(pad(serializationResult.result ? "Y" : "n", maxObjenesisWidth));

            if(serializationResult.exception != null) {
               exceptions.add(serializationResult);
            }
         }

         summary.println();
      }

      summary.println();

      // Final
      if(errorCount != 0) {

         for(Result element : exceptions) {
            log.println("--- Candidate '" + element.candidate.getDescription() + "', Type '" + element.type + "' ---");
            element.exception.printStackTrace(log);
            log.println();
         }

         log.println();

         summary.println("--- FAILED: " + errorCount + " error(s) occurred ---");
      }
      else {
         summary.println("--- SUCCESSFUL: TCK tests passed without errors in " + totalTime + " ms");
      }

      summary.println();
   }
884271
protected function createArguments(ResultPrinter $printer, \PHPUnit_Framework_TestResult $testResult)
    {
        $arguments = array();
        $arguments['printer'] = $printer;

        Stream::register();
        $arguments['listeners'] =
            array(
                new TestDoxPrinter(
                    fopen('testdox://'.spl_object_hash($testResult), 'w'),
                    $this->terminal,
                    $this->prettifier()
                ),
            );

        if ($this->hasJUnitXMLFile()) {
            $arguments['listeners'][] = new JUnitXMLPrinter(
                null,
                $this->createJUnitXMLWriter(),
                $this->testTargetRepository
            );
        }

        if ($this->shouldStopOnFailure()) {
            $arguments['stopOnFailure'] = true;
            $arguments['stopOnError'] = true;
        }

        $phpunitConfiguration = $this->phpunitConfigurationFactory->create();
        if (!is_null($phpunitConfiguration)) {
            $arguments['configuration'] = $phpunitConfiguration->getFileName();
        }

        return $arguments;
    }
505052
private function renderResult(Result $result)
    {
        if ($result->hasNotices()) {
            /** @var Notice $notice */
            foreach ($result->getNotices() as $notice) {
                if (!empty($notice->getTitle())) {
                    $this->outputLine('<b>%s</b>: %s', [$notice->getTitle(), $notice->render()]);
                } else {
                    $this->outputLine($notice->render());
                }
            }
        }

        if ($result->hasErrors()) {
            /** @var Error $error */
            foreach ($result->getErrors() as $error) {
                $this->outputLine('<error>ERROR: %s</error>', [$error->render()]);
            }
        }
        if ($result->hasWarnings()) {
            /** @var Warning $warning */
            foreach ($result->getWarnings() as $warning) {
                if (!empty($warning->getTitle())) {
                    $this->outputLine('<b>%s</b>: <comment>%s</comment>', [$warning->getTitle(), $warning->render()]);
                } else {
                    $this->outputLine('<comment>%s</comment>', [$warning->render()]);
                }
            }
        }
        if (!$result->hasErrors() && !$result->hasWarnings()) {
            $this->outputLine('<success>OK</success>');
        }
    }
1017625
protected function printMessage(OutputInterface $output, array $response)
    {
        $this->printBoolean($output, $response['message'], $response['message'], true === $response['success']);
    }
1013188
private function printHookCallException(OutputPrinter $printer, CallResult $callResult, $indentText)
    {
        if (!$callResult->hasException()) {
            return;
        }

        $pad = function ($l) use ($indentText) {
            return sprintf(
                '%s╳  {+exception}%s{-exception}', $indentText, $l
            );
        };

        $exception = $this->exceptionPresenter->presentException($callResult->getException());
        $printer->writeln(implode("\n", array_map($pad, explode("\n", $exception))));
        $printer->writeln(sprintf('%s│', $indentText));
    }
96196
public void printStartRecordGridData(PrintWriter out, int iPrintOptions)
    {
        out.println(Utility.startTag(XMLTags.DETAIL));
        out.println(Utility.startTag(XMLTags.FILE));
    }
1165569
public static function printResult(
        OutputInterface $output,
        Result $result
    ) {
        self::printInfoMessage(
            $output,
            'Number of resources in index',
            $result->getTotalItems()
        );

        self::printInfoMessage(
            $output,
            'Number of hits',
            $result->getTotalHits()
        );

        $output->writeln('');

        foreach ($result->getItems() as $item) {
            $firstStringPosition = array_reduce($item->getAllMetadata(), function ($carry, $element) {
                return is_string($carry)
                    ? $carry
                    : (
                    is_string($element)
                        ? $element
                        : null
                    );
            }, null);

            self::printInfoMessage(
                $output,
                'x',
                sprintf('%s - %s',
                    $item->getUUID()->composeUUID(),
                    substr((string) $firstStringPosition, 0, 50)
                )
            );
        }
    }
488244
public function mapResult(ResultIterator $result, $resultType = ArrayType::BOTH) {
		//check numer of rows returned
		if ($result->countRows() == 0)
			return null;

		//get result column types
		$this->columnTypes = $result->getColumnTypes($resultType);
		
		//validate result map (if any)
		if (isset($this->resultMap))
			$this->buildTypeHandlerList();

		//map row
		return $this->map($result->fetchArray($resultType));
	}