Skip to content

PrettyPrinterForPhpUnit9 results in exception #44

@kec2

Description

@kec2

Im using:

  • PHP: 8.2
  • PHPUnit: 9.5
  • phpunit-pretty-print: 1.4

installed using Composer.

Not sure of what I'm doing wrong but:

use PHPUnit\TextUI\TestRunner;
use PHPUnit\Framework\TestSuite;

$suite  = new TestSuite('imdbTest');
$testRunner = new TestRunner();
$result = $testRunner->run($suite, ['printer'=>'Sempro\PHPUnitPrettyPrinter\PrettyPrinterForPhpUnit9']);

echo $result->toString();

results in an exception:
PHPUnit\Framework\TestResult::addListener(): Argument #1 ($listener) must be of type PHPUnit\Framework\TestListener, null given, called in /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php on line 346

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions