Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ProgressPrinter.php

function ProgressPrinter::printProgress

2 calls to ProgressPrinter::printProgress()
ProgressPrinter::printProgressForSuccess in vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php
ProgressPrinter::printProgressWithColor in vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php

File

vendor/phpunit/phpunit/src/TextUI/Output/Default/ProgressPrinter/ProgressPrinter.php, line 374

Class

ProgressPrinter
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\TextUI\Output\Default\ProgressPrinter

Code

private function printProgress(string $progress) : void {
    $this->printer
        ->print($progress);
    $this->column++;
    $this->numberOfTestsRun++;
    if ($this->column === $this->maxColumn || $this->numberOfTestsRun === $this->numberOfTests) {
        if ($this->numberOfTestsRun === $this->numberOfTests) {
            $this->printer
                ->print(str_repeat(' ', $this->maxColumn - $this->column));
        }
        $this->printer
            ->print(sprintf(' %' . $this->numberOfTestsWidth . 'd / %' . $this->numberOfTestsWidth . 'd (%3s%%)', $this->numberOfTestsRun, $this->numberOfTests, floor($this->numberOfTestsRun / $this->numberOfTests * 100)));
        if ($this->column === $this->maxColumn) {
            $this->column = 0;
            $this->printer
                ->print("\n");
        }
    }
}
RSS feed
Powered by Drupal