Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrettyPrinterForPhpUnit9 results in exception #44

Open
kec2 opened this issue Jul 23, 2022 · 0 comments
Open

PrettyPrinterForPhpUnit9 results in exception #44

kec2 opened this issue Jul 23, 2022 · 0 comments

Comments

@kec2
Copy link

kec2 commented Jul 23, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant