diff --git a/src/Runner/TestResult/TestResult.php b/src/Runner/TestResult/TestResult.php index 28784e57bd7..de328002f16 100644 --- a/src/Runner/TestResult/TestResult.php +++ b/src/Runner/TestResult/TestResult.php @@ -494,12 +494,24 @@ public function hasDeprecations(): bool public function hasPhpOrUserDeprecations(): bool { - return count($this->phpDeprecations) > 0 || count($this->deprecations) > 0; + return $this->numberOfPhpOrUserDeprecations() > 0; + } + + public function numberOfPhpOrUserDeprecations(): int + { + return count($this->deprecations) + + count($this->phpDeprecations); } public function hasPhpunitDeprecations(): bool { - return count($this->testTriggeredPhpunitDeprecationEvents) > 0 || count($this->testRunnerTriggeredDeprecationEvents) > 0; + return $this->numberOfPhpunitDeprecations() > 0; + } + + public function numberOfPhpunitDeprecations(): int + { + return count($this->testTriggeredPhpunitDeprecationEvents) + + count($this->testRunnerTriggeredDeprecationEvents); } public function numberOfDeprecations(): int diff --git a/src/TextUI/Output/SummaryPrinter.php b/src/TextUI/Output/SummaryPrinter.php index aadf7aa4a87..0c540bb503e 100644 --- a/src/TextUI/Output/SummaryPrinter.php +++ b/src/TextUI/Output/SummaryPrinter.php @@ -113,7 +113,8 @@ public function print(TestResult $result): void $this->printCountString($result->numberOfErrors(), 'Errors', $color); $this->printCountString($result->numberOfTestFailedEvents(), 'Failures', $color); $this->printCountString($result->numberOfWarnings(), 'Warnings', $color); - $this->printCountString($result->numberOfDeprecations(), 'Deprecations', $color); + $this->printCountString($result->numberOfPhpOrUserDeprecations(), 'Deprecations', $color); + $this->printCountString($result->numberOfPhpunitDeprecations(), 'PHPUnit Deprecations', $color); $this->printCountString($result->numberOfNotices(), 'Notices', $color); $this->printCountString($result->numberOfTestSuiteSkippedEvents() + $result->numberOfTestSkippedEvents(), 'Skipped', $color); $this->printCountString($result->numberOfTestMarkedIncompleteEvents(), 'Incomplete', $color); diff --git a/tests/end-to-end/cli/fail-on/fail-on-deprecation-output.phpt b/tests/end-to-end/cli/fail-on/fail-on-deprecation-output.phpt index 49d0e333998..2ce2dfecdd6 100644 --- a/tests/end-to-end/cli/fail-on/fail-on-deprecation-output.phpt +++ b/tests/end-to-end/cli/fail-on/fail-on-deprecation-output.phpt @@ -40,4 +40,4 @@ Triggered by: %sDeprecationTest.php:%d OK, but there were issues! -Tests: 3, Assertions: 3, Deprecations: 2. +Tests: 3, Assertions: 3, Deprecations: 1, PHPUnit Deprecations: 1. diff --git a/tests/end-to-end/migration/possibility-to-migrate-from-100-is-detected.phpt b/tests/end-to-end/migration/possibility-to-migrate-from-100-is-detected.phpt index 0d0305a438f..43c2ec2ea0c 100644 --- a/tests/end-to-end/migration/possibility-to-migrate-from-100-is-detected.phpt +++ b/tests/end-to-end/migration/possibility-to-migrate-from-100-is-detected.phpt @@ -25,4 +25,4 @@ There was 1 PHPUnit test runner deprecation: 1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"! OK, but there were issues! -Tests: 1, Assertions: 1, Deprecations: 1. +Tests: 1, Assertions: 1, PHPUnit Deprecations: 1. diff --git a/tests/end-to-end/migration/possibility-to-migrate-from-85-is-detected.phpt b/tests/end-to-end/migration/possibility-to-migrate-from-85-is-detected.phpt index dba809ce5a8..e089167a5db 100644 --- a/tests/end-to-end/migration/possibility-to-migrate-from-85-is-detected.phpt +++ b/tests/end-to-end/migration/possibility-to-migrate-from-85-is-detected.phpt @@ -25,4 +25,4 @@ There was 1 PHPUnit test runner deprecation: 1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"! OK, but there were issues! -Tests: 1, Assertions: 1, Deprecations: 1. +Tests: 1, Assertions: 1, PHPUnit Deprecations: 1. diff --git a/tests/end-to-end/migration/possibility-to-migrate-from-92-is-detected.phpt b/tests/end-to-end/migration/possibility-to-migrate-from-92-is-detected.phpt index 9429f7ed9cf..b1ffbfca961 100644 --- a/tests/end-to-end/migration/possibility-to-migrate-from-92-is-detected.phpt +++ b/tests/end-to-end/migration/possibility-to-migrate-from-92-is-detected.phpt @@ -25,4 +25,4 @@ There was 1 PHPUnit test runner deprecation: 1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"! OK, but there were issues! -Tests: 1, Assertions: 1, Deprecations: 1. +Tests: 1, Assertions: 1, PHPUnit Deprecations: 1. diff --git a/tests/end-to-end/migration/possibility-to-migrate-from-95-is-detected.phpt b/tests/end-to-end/migration/possibility-to-migrate-from-95-is-detected.phpt index 54a3c2fee89..68956d8bcb3 100644 --- a/tests/end-to-end/migration/possibility-to-migrate-from-95-is-detected.phpt +++ b/tests/end-to-end/migration/possibility-to-migrate-from-95-is-detected.phpt @@ -25,4 +25,4 @@ There was 1 PHPUnit test runner deprecation: 1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"! OK, but there were issues! -Tests: 1, Assertions: 1, Deprecations: 1. +Tests: 1, Assertions: 1, PHPUnit Deprecations: 1. diff --git a/tests/end-to-end/regression/5172.phpt b/tests/end-to-end/regression/5172.phpt index d6a59f661a0..7a0a720aa6c 100644 --- a/tests/end-to-end/regression/5172.phpt +++ b/tests/end-to-end/regression/5172.phpt @@ -28,4 +28,4 @@ There was 1 PHPUnit test runner deprecation: 1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"! OK, but there were issues! -Tests: 1, Assertions: 1, Deprecations: 1. +Tests: 1, Assertions: 1, PHPUnit Deprecations: 1. diff --git a/tests/unit/TextUI/Output/Default/expectations/successful_test_with_phpunit_deprecation.txt b/tests/unit/TextUI/Output/Default/expectations/successful_test_with_phpunit_deprecation.txt index 630b31dd304..f5f8711f8b1 100644 --- a/tests/unit/TextUI/Output/Default/expectations/successful_test_with_phpunit_deprecation.txt +++ b/tests/unit/TextUI/Output/Default/expectations/successful_test_with_phpunit_deprecation.txt @@ -12,4 +12,4 @@ message %s:%i OK, but there were issues! -Tests: 1, Assertions: 1, Deprecations: 2. +Tests: 1, Assertions: 1, PHPUnit Deprecations: 2.