diff --git a/composer.json b/composer.json index 18e04125..16d7db6d 100644 --- a/composer.json +++ b/composer.json @@ -18,15 +18,15 @@ ], "require": { "php": "^8.1.0", - "brianium/paratest": "^7.2.8", + "brianium/paratest": "^7.2.9", "nunomaduro/collision": "^7.9.0", "nunomaduro/termwind": "^1.15.1", "pestphp/pest-plugin": "^2.1.1", "pestphp/pest-plugin-arch": "^2.3.3", - "phpunit/phpunit": "^10.3.5" + "phpunit/phpunit": "^10.4.0" }, "conflict": { - "phpunit/phpunit": ">10.3.5", + "phpunit/phpunit": ">10.4.0", "sebastian/exporter": "<5.1.0", "webmozart/assert": "<1.11.0" }, diff --git a/src/Mixins/Expectation.php b/src/Mixins/Expectation.php index e42fc96a..1ba4872f 100644 --- a/src/Mixins/Expectation.php +++ b/src/Mixins/Expectation.php @@ -967,6 +967,7 @@ final class Expectation } Assert::assertInstanceOf($exception, $e, $message); + $callback($e); return $this; diff --git a/src/Plugins/Parallel/Paratest/WrapperRunner.php b/src/Plugins/Parallel/Paratest/WrapperRunner.php index 0c955574..46c1f994 100644 --- a/src/Plugins/Parallel/Paratest/WrapperRunner.php +++ b/src/Plugins/Parallel/Paratest/WrapperRunner.php @@ -297,6 +297,7 @@ final class WrapperRunner implements RunnerInterface array_merge_recursive($testResultSum->phpDeprecations(), $testResult->phpDeprecations()), array_merge_recursive($testResultSum->phpNotices(), $testResult->phpNotices()), array_merge_recursive($testResultSum->phpWarnings(), $testResult->phpWarnings()), + $testResultSum->numberOfIssuesIgnoredByBaseline() + $testResult->numberOfIssuesIgnoredByBaseline(), ); } @@ -325,6 +326,8 @@ final class WrapperRunner implements RunnerInterface $testResultSum->phpDeprecations(), $testResultSum->phpNotices(), $testResultSum->phpWarnings(), + $testResultSum->numberOfIssuesIgnoredByBaseline(), + ); $this->printer->printResults( 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 d91c52a3..1ebb587e 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 2.20.0. + Pest Testing Framework 2.21.0. USAGE: pest [options] @@ -14,6 +14,9 @@ --cache-directory [dir] ............................ Specify cache directory --generate-configuration Generate configuration file with suggested settings --migrate-configuration ....... Migrate configuration file to current format + --generate-baseline [file] .................... Generate baseline for issues + --use-baseline [file] ........................ Use baseline to ignore issues + --ignore-baseline ..................... Do not use baseline to ignore issues SELECTION OPTIONS: --bail ........................... Stop execution upon first not-passed test @@ -89,7 +92,7 @@ --testdox-html [file] .. Write test results in TestDox format (HTML) to file --testdox-text [file] Write test results in TestDox format (plain text) to file --log-events-text [file] ............... Stream events as plain text to file - --log-events-verbose-text [file] Stream events as plain text (with telemetry information) to file + --log-events-verbose-text [file] Stream events as plain text with extended information to file --no-logging ....... Ignore logging configured in the XML configuration file CODE COVERAGE 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 31dd9a4a..4768cd1d 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 2.20.0. + Pest Testing Framework 2.21.0. diff --git a/tests/Features/Expect/toThrow.php b/tests/Features/Expect/toThrow.php index 67750c0b..1444ccca 100644 --- a/tests/Features/Expect/toThrow.php +++ b/tests/Features/Expect/toThrow.php @@ -57,8 +57,9 @@ test('failures 3', function () { expect(function () { throw new Exception(); })->toThrow(function (RuntimeException $e) { + // }); -})->throws(ExpectationFailedException::class, 'Failed asserting that Exception Object'); +})->throws(ExpectationFailedException::class, 'Failed asserting that an object is an instance of class RuntimeException.'); test('failures 4', function () { expect(function () { @@ -73,7 +74,7 @@ test('failures 5', function () { expect(function () { throw new Exception('actual message'); })->toThrow('expected message'); -})->throws(ExpectationFailedException::class, 'Failed asserting that \'actual message\' contains "expected message".'); +})->throws(ExpectationFailedException::class, 'Failed asserting that \'actual message\' [ASCII](length: 14) contains "expected message" [ASCII](length: 16).'); test('failures 6', function () { expect(function () {