Skip to content

Instantly share code, notes, and snippets.

@ghostwriter
Created August 25, 2023 04:18
Show Gist options
  • Save ghostwriter/d7ec8038825a05044309533d1bc75332 to your computer and use it in GitHub Desktop.
Save ghostwriter/d7ec8038825a05044309533d1bc75332 to your computer and use it in GitHub Desktop.
PHPUnit 10 Issue - Testdox missing error messages
--TEST--
Testdox: Missing force-covers-annotation error messages "This test does not define a code coverage target but is expected to do so".
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--testdox';
$_SERVER['argv'][] = '--display-errors';
$_SERVER['argv'][] = '--display-notices';
$_SERVER['argv'][] = '--display-warnings';
$_SERVER['argv'][] = '--display-deprecations';
$_SERVER['argv'][] = '--strict-coverage';
$_SERVER['argv'][] = '--configuration';
$_SERVER['argv'][] = __DIR__ . '/../_files/force-covers-annotation/phpunit.xml';
$_SERVER['argv'][] = __DIR__ . '/../_files/force-covers-annotation/tests/Test.php';
require_once __DIR__ . '/../../bootstrap.php';
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
Runtime: %s
Configuration: %s
R 1 / 1 (100%)
Time: %s, Memory: %s
Unnamed Tests (PHPUnit\TestFixture\UnnamedTests)
☢ One
OK, but there were issues!
Tests: 1, Assertions: 1, Risky: 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment