diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c4902b42..a66b4597 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,7 +28,7 @@ jobs: with: php-version: ${{ matrix.php }} tools: composer:v2 - coverage: none + coverage: xdebug - name: Setup Problem Matches run: | diff --git a/composer.json b/composer.json index 50423f3b..3e2adf42 100644 --- a/composer.json +++ b/composer.json @@ -24,11 +24,11 @@ "pestphp/pest-plugin": "^3.0.0", "pestphp/pest-plugin-arch": "^3.0.0", "pestphp/pest-plugin-mutate": "^3.0.5", - "phpunit/phpunit": "^11.5.1" + "phpunit/phpunit": "^11.5.3" }, "conflict": { "filp/whoops": "<2.16.0", - "phpunit/phpunit": ">11.5.1", + "phpunit/phpunit": ">11.5.3", "sebastian/exporter": "<6.0.0", "webmozart/assert": "<1.11.0" }, @@ -54,7 +54,7 @@ }, "require-dev": { "pestphp/pest-dev-tools": "^3.3.0", - "pestphp/pest-plugin-type-coverage": "^3.2.0", + "pestphp/pest-plugin-type-coverage": "^3.2.3", "symfony/process": "^7.2.0" }, "minimum-stability": "dev", diff --git a/overrides/Logging/JUnit/JunitXmlLogger.php b/overrides/Logging/JUnit/JunitXmlLogger.php index 1a899ea3..ca5c02c4 100644 --- a/overrides/Logging/JUnit/JunitXmlLogger.php +++ b/overrides/Logging/JUnit/JunitXmlLogger.php @@ -446,7 +446,7 @@ final class JunitXmlLogger if ($test->isTestMethod()) { assert($test instanceof TestMethod); - //$testCase->setAttribute('line', (string) $test->line()); // pest-removed + // $testCase->setAttribute('line', (string) $test->line()); // pest-removed $className = $this->converter->getTrimmedTestClassName($test); // pest-added $testCase->setAttribute('class', $className); // pest-changed $testCase->setAttribute('classname', str_replace('\\', '.', $className)); // pest-changed diff --git a/src/Bootstrappers/BootOverrides.php b/src/Bootstrappers/BootOverrides.php index 8e58c61c..efbcf7a3 100644 --- a/src/Bootstrappers/BootOverrides.php +++ b/src/Bootstrappers/BootOverrides.php @@ -25,7 +25,7 @@ final class BootOverrides implements Bootstrapper '8abdad6413329c6fe0d7d44a8b9926e390af32c0b3123f3720bb9c5bbc6fbb7e' => 'TextUI/Output/Default/ProgressPrinter/Subscriber/TestSkippedSubscriber.php', 'b4250fc3ffad5954624cb5e682fd940b874e8d3422fa1ee298bd7225e1aa5fc2' => 'TextUI/TestSuiteFilterProcessor.php', '8cfcb4999af79463eca51a42058e502ea4ddc776cba5677bf2f8eb6093e21a5c' => 'Event/Value/ThrowableBuilder.php', - 'ede161507d4c9c27805f55a05a32c3bb528e53b6e1fc092bfafdb8207e0019e9' => 'Logging/JUnit/JunitXmlLogger.php', + '86cd9bcaa53cdd59c5b13e58f30064a015c549501e7629d93b96893d4dee1eb1' => 'Logging/JUnit/JunitXmlLogger.php', ]; /** diff --git a/src/Logging/Converter.php b/src/Logging/Converter.php index 5ac17a5a..b4560e22 100644 --- a/src/Logging/Converter.php +++ b/src/Logging/Converter.php @@ -11,6 +11,7 @@ use Pest\Support\Str; use PHPUnit\Event\Code\Test; use PHPUnit\Event\Code\TestMethod; use PHPUnit\Event\Code\Throwable; +use PHPUnit\Event\Test\AfterLastTestMethodErrored; use PHPUnit\Event\Test\BeforeFirstTestMethodErrored; use PHPUnit\Event\Test\ConsideredRisky; use PHPUnit\Event\Test\Errored; @@ -254,8 +255,9 @@ final readonly class Converter $numberOfNotPassedTests = count( array_unique( array_map( - function (BeforeFirstTestMethodErrored|Errored|Failed|Skipped|ConsideredRisky|MarkedIncomplete $event): string { - if ($event instanceof BeforeFirstTestMethodErrored) { + function (AfterLastTestMethodErrored|BeforeFirstTestMethodErrored|Errored|Failed|Skipped|ConsideredRisky|MarkedIncomplete $event): string { + if ($event instanceof BeforeFirstTestMethodErrored + || $event instanceof AfterLastTestMethodErrored) { return $event->testClassName(); } diff --git a/src/Pest.php b/src/Pest.php index 87a2c03a..d6e5a8b1 100644 --- a/src/Pest.php +++ b/src/Pest.php @@ -6,7 +6,7 @@ namespace Pest; function version(): string { - return '3.7.1'; + return '3.7.2'; } function testDirectory(string $file = ''): string diff --git a/src/Support/StateGenerator.php b/src/Support/StateGenerator.php index 90636d9d..a7ddba1a 100644 --- a/src/Support/StateGenerator.php +++ b/src/Support/StateGenerator.php @@ -30,6 +30,7 @@ final class StateGenerator $testResultEvent->throwable() )); } else { + // @phpstan-ignore-next-line $state->add(TestResult::fromBeforeFirstTestMethodErrored($testResultEvent)); } } diff --git a/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap b/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap index 9430ebaa..76123350 100644 --- a/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap +++ b/tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap @@ -1,5 +1,5 @@ - Pest Testing Framework 3.7.1. + Pest Testing Framework 3.7.2. USAGE: pest [options] diff --git a/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap b/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap index 02dd6462..79cd97b4 100644 --- a/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap +++ b/tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap @@ -1,3 +1,3 @@ - Pest Testing Framework 3.7.1. + Pest Testing Framework 3.7.2. diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index 90b1b085..f60db5a0 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -62,9 +62,9 @@ ↓ is marked as todo 3 ↓ shouldBeMarkedAsTodo - WARN Tests\Features\Coverage + PASS Tests\Features\Coverage ✓ it has plugin - - it adds coverage if --coverage exist → Coverage is not available + ✓ it adds coverage if --coverage exist ✓ it adds coverage if --min exist ✓ it generates coverage based on file input @@ -1708,4 +1708,4 @@ WARN Tests\Visual\Version - visual snapshot of help command output - Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 38 todos, 33 skipped, 1152 passed (2744 assertions) \ No newline at end of file + Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 38 todos, 32 skipped, 1153 passed (2749 assertions) \ No newline at end of file diff --git a/tests/Features/DescriptionLess.php b/tests/Features/DescriptionLess.php index 0bc28720..62b1fba6 100644 --- a/tests/Features/DescriptionLess.php +++ b/tests/Features/DescriptionLess.php @@ -31,7 +31,7 @@ get('foo')->get('bar')->expect(true)->toBeTrue(); get('foo')->expect(true)->toBeTrue(); describe('a "describe" group of tests', function () { - get('foo'); // not incomplete because closure is created... +get('foo'); // not incomplete because closure is created... get('foo')->get('bar')->expect(true)->toBeTrue(); get('foo')->expect(true)->toBeTrue(); -}); + }); diff --git a/tests/Visual/Parallel.php b/tests/Visual/Parallel.php index 036f51d7..9992f05e 100644 --- a/tests/Visual/Parallel.php +++ b/tests/Visual/Parallel.php @@ -16,7 +16,7 @@ $run = function () { test('parallel', function () use ($run) { expect($run('--exclude-group=integration')) - ->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 38 todos, 24 skipped, 1142 passed (2720 assertions)') + ->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 38 todos, 23 skipped, 1143 passed (2725 assertions)') ->toContain('Parallel: 3 processes'); })->skipOnWindows();