phpunit-pretty-result-printer: Terminal is hanging when starting phpunit on Windows

I just installed the extension and put

<phpunit printerClass="Codedungeon\PHPUnitPrettyResultPrinter\Printer">

in my phpunit.xml

When trying to run phpunit the terminal just hangs. I can stop the script with ctrl+c, so it doesn’t freeze the terminal. The problem is, nothing happens.

I am using Windows 10. Tried with the command prompt, Windows Powershell and GitBash.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Hey gang, I had time to work on this project before the weekend and have cured the above noted issues. Please upgrade to the 0.8.1 or greater release 😃

@erdmenchen @drjekyll

This looks good, will be merging PR and tagging this afternoon.

what about this code here?

Printer::getConfigurationFile()

$continue = true;
while (!file_exists($filename) && $continue):
    if ($this->isWindows()) {
        // WINDOWS SPECIFIC CODE GOES HERE
    } else {
        $filename = $configPath . DIRECTORY_SEPARATOR . $configFileName;
        if ($configPath === '/') {
            $filename = $defaultConfigFilename;
            $continue = false;
        }
        $configPath = \dirname($configPath);
    }

endwhile;

edit: fixed, see pull request #39

@ntraykov OK, thank you for this information, I will move forward with further testing to reproduce this issue.

I have the same problem.

Windows 10.0.15063 Laravel 5.6 PHPUnit 7.0.2 PHP 7.1.12 (cli)

Adding it to phpunit.xml results in the hang. Running from command line

phpunit --printer=Codedungeon\\PHPUnitPrettyResultPrinter\\Printer

gives “Could not use “Codedungeon\PHPUnitPrettyResultPrinter\Printer” as printer: class does not exist”