Skip to content

Commit c697539

Browse files
Implement --do-not-report-useless-tests CLI option to replace --dont-report-useless-tests
1 parent 42fb8f6 commit c697539

File tree

12 files changed

+32
-10
lines changed

12 files changed

+32
-10
lines changed

ChangeLog-10.5.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes of the PHPUnit 10.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
44

5+
## [10.5.47] - 2025-MM-DD
6+
7+
### Added
8+
9+
* `--do-not-report-useless-tests` CLI option as a replacement for `--dont-report-useless-tests`
10+
11+
### Deprecated
12+
13+
* `--dont-report-useless-tests` CLI option (use `--do-not-report-useless-tests` instead)
14+
515
## [10.5.46] - 2025-05-02
616

717
### Added
@@ -414,6 +424,7 @@ All notable changes of the PHPUnit 10.5 release series are documented in this fi
414424

415425
* [#5563](https://github.com/sebastianbergmann/phpunit/issues/5563): `createMockForIntersectionOfInterfaces()` does not automatically register mock object for expectation verification
416426

427+
[10.5.47]: https://github.com/sebastianbergmann/phpunit/compare/10.5.46...10.5
417428
[10.5.46]: https://github.com/sebastianbergmann/phpunit/compare/10.5.45...10.5.46
418429
[10.5.45]: https://github.com/sebastianbergmann/phpunit/compare/10.5.44...10.5.45
419430
[10.5.44]: https://github.com/sebastianbergmann/phpunit/compare/10.5.43...10.5.44

src/TextUI/Configuration/Cli/Builder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ final class Builder
9595
'no-results',
9696
'order-by=',
9797
'process-isolation',
98+
'do-not-report-useless-tests',
9899
'dont-report-useless-tests',
99100
'random-order',
100101
'random-order-seed=',
@@ -737,6 +738,7 @@ public function fromParameters(array $parameters): Configuration
737738

738739
break;
739740

741+
case '--do-not-report-useless-tests':
740742
case '--dont-report-useless-tests':
741743
$reportUselessTests = false;
742744

src/TextUI/Help.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ private function elements(): array
194194
['arg' => '--disallow-test-output', 'desc' => 'Be strict about output during tests'],
195195
['arg' => '--enforce-time-limit', 'desc' => 'Enforce time limit based on test size'],
196196
['arg' => '--default-time-limit <sec>', 'desc' => 'Timeout in seconds for tests that have no declared size'],
197-
['arg' => '--dont-report-useless-tests', 'desc' => 'Do not report tests that do not test anything'],
197+
['arg' => '--do-not-report-useless-tests', 'desc' => 'Do not report tests that do not test anything'],
198198
['spacer' => ''],
199199

200200
['arg' => '--stop-on-defect', 'desc' => 'Stop after first error, failure, warning, or risky test'],

tests/end-to-end/_files/output-cli-help-color.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
--enforce-time-limit  Enforce time limit based on test size
5454
--default-time-limit <sec>  Timeout in seconds for tests that have no
5555
declared size
56-
--dont-report-useless-tests  Do not report tests that do not test
56+
--do-not-report-useless-tests  Do not report tests that do not test
5757
anything
5858

5959
--stop-on-defect  Stop after first error, failure, warning,

tests/end-to-end/_files/output-cli-usage.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Execution:
4444
--disallow-test-output Be strict about output during tests
4545
--enforce-time-limit Enforce time limit based on test size
4646
--default-time-limit <sec> Timeout in seconds for tests that have no declared size
47-
--dont-report-useless-tests Do not report tests that do not test anything
47+
--do-not-report-useless-tests Do not report tests that do not test anything
4848

4949
--stop-on-defect Stop after first error, failure, warning, or risky test
5050
--stop-on-error Stop after first error

tests/end-to-end/generic/exception-stack.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ phpunit ../../_files/ExceptionStackTest.php
44
<?php declare(strict_types=1);
55
$_SERVER['argv'][] = '--do-not-cache-result';
66
$_SERVER['argv'][] = '--no-configuration';
7-
$_SERVER['argv'][] = '--dont-report-useless-tests';
7+
$_SERVER['argv'][] = '--do-not-report-useless-tests';
88
$_SERVER['argv'][] = __DIR__ . '/../../_files/ExceptionStackTest.php';
99

1010
require_once __DIR__ . '/../../bootstrap.php';

tests/end-to-end/generic/transform-exception-hook-method.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ https://github.com/sebastianbergmann/phpunit/issues/5300
33
--FILE--
44
<?php declare(strict_types=1);
55
$_SERVER['argv'][] = '--do-not-cache-result';
6-
$_SERVER['argv'][] = '--dont-report-useless-tests';
6+
$_SERVER['argv'][] = '--do-not-report-useless-tests';
77
$_SERVER['argv'][] = '--configuration';
88
$_SERVER['argv'][] = __DIR__ . '/../_files/transform-exception-hook-method';
99

tests/end-to-end/logging/junit/with-progress-with-errors.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $logfile = tempnam(sys_get_temp_dir(), __FILE__);
1111

1212
$_SERVER['argv'][] = '--do-not-cache-result';
1313
$_SERVER['argv'][] = '--no-configuration';
14-
$_SERVER['argv'][] = '--dont-report-useless-tests';
14+
$_SERVER['argv'][] = '--do-not-report-useless-tests';
1515
$_SERVER['argv'][] = '--log-junit';
1616
$_SERVER['argv'][] = $logfile;
1717
$_SERVER['argv'][] = __DIR__ . '/../_files/TypeErrorTest.php';

tests/end-to-end/logging/teamcity/teamcity-inner-exceptions.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ phpunit --log-teamcity php://stdout ../../_files/ExceptionStackTest.php
44
<?php declare(strict_types=1);
55
$_SERVER['argv'][] = '--do-not-cache-result';
66
$_SERVER['argv'][] = '--no-configuration';
7-
$_SERVER['argv'][] = '--dont-report-useless-tests';
7+
$_SERVER['argv'][] = '--do-not-report-useless-tests';
88
$_SERVER['argv'][] = '--no-output';
99
$_SERVER['argv'][] = '--log-teamcity';
1010
$_SERVER['argv'][] = 'php://stdout';

tests/end-to-end/regression/4376.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ https://github.com/sebastianbergmann/phpunit/issues/4376
33
--FILE--
44
<?php declare(strict_types=1);
55
$_SERVER['argv'][] = '--do-not-cache-result';
6-
$_SERVER['argv'][] = '--dont-report-useless-tests';
6+
$_SERVER['argv'][] = '--do-not-report-useless-tests';
77
$_SERVER['argv'][] = '--configuration';
88
$_SERVER['argv'][] = __DIR__ . '/4376/';
99

0 commit comments

Comments
 (0)