From 1fec9a59aeb2c712e8c10d786eea10969af55eb1 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Tue, 8 Oct 2024 10:53:05 +0200 Subject: [PATCH 1/3] Improve test isolation --- composer.json | 6 +++++- .../_files/MultiDependencyTest.php | 0 ...ore-class-using-attribute-process-isolation.phpt | 2 ++ .../code-coverage/ignore-class-using-attribute.phpt | 2 ++ ...-function-using-attribute-process-isolation.phpt | 2 ++ .../ignore-function-using-attribute.phpt | 2 ++ ...re-method-using-attribute-process-isolation.phpt | 2 ++ .../ignore-method-using-attribute.phpt | 2 ++ .../CustomFailureException.php | 0 .../CustomFailureInterface.php | 0 .../CustomFailureInterfaceTest.php | 0 .../_files/custom-failure-interface/bootstrap.php | 13 +++++++++++++ tests/end-to-end/event/custom-comparator.phpt | 3 +++ tests/end-to-end/event/data-provider-external.phpt | 3 +++ tests/end-to-end/event/mock-object.phpt | 3 +++ .../event/registered-failure-interface.phpt | 5 ++++- tests/end-to-end/event/test-stub.phpt | 3 +++ tests/end-to-end/execution-order/cache-result.phpt | 2 +- .../depends-multiple-parameter-with-isolation.phpt | 2 +- .../depends-multiple-parameters.phpt | 2 +- ...order-randomized-with-dependency-resolution.phpt | 2 +- tests/end-to-end/regression/4232.phpt | 2 ++ tests/end-to-end/regression/5218.phpt | 2 ++ tests/end-to-end/regression/5287.phpt | 3 +++ tests/end-to-end/regression/5498.phpt | 3 +++ tests/end-to-end/testdox/_files/bootstrap.php | 12 ++++++++++++ ...ovider-with-numeric-data-set-name-colorized.phpt | 2 ++ ...rs-data-provider-with-numeric-data-set-name.phpt | 2 ++ ...rovider-with-string-data-set-name-colorized.phpt | 2 ++ ...ers-data-provider-with-string-data-set-name.phpt | 2 ++ 30 files changed, 80 insertions(+), 6 deletions(-) rename tests/{end-to-end/execution-order => }/_files/MultiDependencyTest.php (100%) rename tests/end-to-end/event/_files/{ => custom-failure-interface}/CustomFailureException.php (100%) rename tests/end-to-end/event/_files/{ => custom-failure-interface}/CustomFailureInterface.php (100%) rename tests/end-to-end/event/_files/{ => custom-failure-interface}/CustomFailureInterfaceTest.php (100%) create mode 100644 tests/end-to-end/event/_files/custom-failure-interface/bootstrap.php create mode 100644 tests/end-to-end/testdox/_files/bootstrap.php diff --git a/composer.json b/composer.json index a9269b0a11a..0b6767476c0 100644 --- a/composer.json +++ b/composer.json @@ -72,9 +72,13 @@ }, "autoload-dev": { "classmap": [ - "tests/" + "tests/_files" ], "files": [ + "tests/unit/Event/AbstractEventTestCase.php", + "tests/unit/Framework/MockObject/TestDoubleTestCase.php", + "tests/unit/Metadata/Parser/AnnotationParserTestCase.php", + "tests/unit/Metadata/Parser/AttributeParserTestCase.php", "tests/_files/CoverageNamespacedFunctionTest.php", "tests/_files/CoveredFunction.php", "tests/_files/Generator.php", diff --git a/tests/end-to-end/execution-order/_files/MultiDependencyTest.php b/tests/_files/MultiDependencyTest.php similarity index 100% rename from tests/end-to-end/execution-order/_files/MultiDependencyTest.php rename to tests/_files/MultiDependencyTest.php diff --git a/tests/end-to-end/code-coverage/ignore-class-using-attribute-process-isolation.phpt b/tests/end-to-end/code-coverage/ignore-class-using-attribute-process-isolation.phpt index 3eff2e41f32..960a5178b3e 100644 --- a/tests/end-to-end/code-coverage/ignore-class-using-attribute-process-isolation.phpt +++ b/tests/end-to-end/code-coverage/ignore-class-using-attribute-process-isolation.phpt @@ -10,6 +10,8 @@ require __DIR__ . '/../../_files/skip-if-requires-code-coverage-driver.php'; $_SERVER['argv'][] = '--do-not-cache-result'; $_SERVER['argv'][] = '--no-configuration'; $_SERVER['argv'][] = '--process-isolation'; +$_SERVER['argv'][] = '--bootstrap'; +$_SERVER['argv'][] = __DIR__ . '/ignore-class-using-attribute/src/CoveredClass.php'; $_SERVER['argv'][] = '--coverage-filter'; $_SERVER['argv'][] = __DIR__ . '/ignore-class-using-attribute/src'; $_SERVER['argv'][] = '--coverage-text'; diff --git a/tests/end-to-end/code-coverage/ignore-class-using-attribute.phpt b/tests/end-to-end/code-coverage/ignore-class-using-attribute.phpt index 0617a7a7dd7..58ebab6d165 100644 --- a/tests/end-to-end/code-coverage/ignore-class-using-attribute.phpt +++ b/tests/end-to-end/code-coverage/ignore-class-using-attribute.phpt @@ -9,6 +9,8 @@ require __DIR__ . '/../../_files/skip-if-requires-code-coverage-driver.php'; + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +require __DIR__ . '/CustomFailureInterface.php'; + +require __DIR__ . '/CustomFailureException.php'; diff --git a/tests/end-to-end/event/custom-comparator.phpt b/tests/end-to-end/event/custom-comparator.phpt index 75e011e2669..8a3978979b6 100644 --- a/tests/end-to-end/event/custom-comparator.phpt +++ b/tests/end-to-end/event/custom-comparator.phpt @@ -6,6 +6,8 @@ $traceFile = tempnam(sys_get_temp_dir(), __FILE__); $_SERVER['argv'][] = '--do-not-cache-result'; $_SERVER['argv'][] = '--no-configuration'; +$_SERVER['argv'][] = '--bootstrap'; +$_SERVER['argv'][] = __DIR__ . '/_files/CustomComparator.php'; $_SERVER['argv'][] = '--no-output'; $_SERVER['argv'][] = '--log-events-text'; $_SERVER['argv'][] = $traceFile; @@ -21,6 +23,7 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured +Bootstrap Finished (%sCustomComparator.php) Test Suite Loaded (1 test) Event Facade Sealed Test Runner Started diff --git a/tests/end-to-end/event/data-provider-external.phpt b/tests/end-to-end/event/data-provider-external.phpt index 0496056ffc1..bca0013e479 100644 --- a/tests/end-to-end/event/data-provider-external.phpt +++ b/tests/end-to-end/event/data-provider-external.phpt @@ -6,6 +6,8 @@ $traceFile = tempnam(sys_get_temp_dir(), __FILE__); $_SERVER['argv'][] = '--do-not-cache-result'; $_SERVER['argv'][] = '--no-configuration'; +$_SERVER['argv'][] = '--bootstrap'; +$_SERVER['argv'][] = __DIR__ . '/_files/DataProvider.php'; $_SERVER['argv'][] = '--no-output'; $_SERVER['argv'][] = '--log-events-text'; $_SERVER['argv'][] = $traceFile; @@ -21,6 +23,7 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured +Bootstrap Finished (%sDataProvider.php) Data Provider Method Called (PHPUnit\TestFixture\Event\DataProvider::values for test method PHPUnit\TestFixture\Event\DataProviderExternalTest::testSuccess) Data Provider Method Finished for PHPUnit\TestFixture\Event\DataProviderExternalTest::testSuccess: - PHPUnit\TestFixture\Event\DataProvider::values diff --git a/tests/end-to-end/event/mock-object.phpt b/tests/end-to-end/event/mock-object.phpt index 747f69c09d8..ba827130a2b 100644 --- a/tests/end-to-end/event/mock-object.phpt +++ b/tests/end-to-end/event/mock-object.phpt @@ -6,6 +6,8 @@ $traceFile = tempnam(sys_get_temp_dir(), __FILE__); $_SERVER['argv'][] = '--do-not-cache-result'; $_SERVER['argv'][] = '--no-configuration'; +$_SERVER['argv'][] = '--bootstrap'; +$_SERVER['argv'][] = __DIR__ . '/_files/Example.php'; $_SERVER['argv'][] = '--no-output'; $_SERVER['argv'][] = '--log-events-text'; $_SERVER['argv'][] = $traceFile; @@ -21,6 +23,7 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured +Bootstrap Finished (%sExample.php) Test Suite Loaded (1 test) Event Facade Sealed Test Runner Started diff --git a/tests/end-to-end/event/registered-failure-interface.phpt b/tests/end-to-end/event/registered-failure-interface.phpt index 2320e05854f..401e5e3f213 100644 --- a/tests/end-to-end/event/registered-failure-interface.phpt +++ b/tests/end-to-end/event/registered-failure-interface.phpt @@ -6,10 +6,12 @@ $traceFile = tempnam(sys_get_temp_dir(), __FILE__); $_SERVER['argv'][] = '--do-not-cache-result'; $_SERVER['argv'][] = '--no-configuration'; +$_SERVER['argv'][] = '--bootstrap'; +$_SERVER['argv'][] = __DIR__ . '/_files/custom-failure-interface/bootstrap.php'; $_SERVER['argv'][] = '--no-output'; $_SERVER['argv'][] = '--log-events-text'; $_SERVER['argv'][] = $traceFile; -$_SERVER['argv'][] = __DIR__ . '/_files/CustomFailureInterfaceTest.php'; +$_SERVER['argv'][] = __DIR__ . '/_files/custom-failure-interface/CustomFailureInterfaceTest.php'; require __DIR__ . '/../../bootstrap.php'; @@ -21,6 +23,7 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured +Bootstrap Finished (%sbootstrap.php) Test Suite Loaded (2 tests) Event Facade Sealed Test Runner Started diff --git a/tests/end-to-end/event/test-stub.phpt b/tests/end-to-end/event/test-stub.phpt index 6a75b6bd8a9..4c21b069711 100644 --- a/tests/end-to-end/event/test-stub.phpt +++ b/tests/end-to-end/event/test-stub.phpt @@ -6,6 +6,8 @@ $traceFile = tempnam(sys_get_temp_dir(), __FILE__); $_SERVER['argv'][] = '--do-not-cache-result'; $_SERVER['argv'][] = '--no-configuration'; +$_SERVER['argv'][] = '--bootstrap'; +$_SERVER['argv'][] = __DIR__ . '/_files/Example.php'; $_SERVER['argv'][] = '--no-output'; $_SERVER['argv'][] = '--log-events-text'; $_SERVER['argv'][] = $traceFile; @@ -21,6 +23,7 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured +Bootstrap Finished (%sExample.php) Test Suite Loaded (1 test) Event Facade Sealed Test Runner Started diff --git a/tests/end-to-end/execution-order/cache-result.phpt b/tests/end-to-end/execution-order/cache-result.phpt index b855577d074..7800e94e781 100644 --- a/tests/end-to-end/execution-order/cache-result.phpt +++ b/tests/end-to-end/execution-order/cache-result.phpt @@ -9,7 +9,7 @@ $_SERVER['argv'][] = '--ignore-dependencies'; // keep coverage for legacy CLI $_SERVER['argv'][] = '--order-by=reverse'; $_SERVER['argv'][] = '--cache-result'; $_SERVER['argv'][] = '--cache-directory=' . $cacheDirectory; -$_SERVER['argv'][] = realpath(__DIR__ . '/../execution-order/_files/MultiDependencyTest.php'); +$_SERVER['argv'][] = __DIR__ . '/../../_files/MultiDependencyTest.php'; require_once __DIR__ . '/../../bootstrap.php'; diff --git a/tests/end-to-end/execution-order/depends-multiple-parameter-with-isolation.phpt b/tests/end-to-end/execution-order/depends-multiple-parameter-with-isolation.phpt index a629ad66fe5..9f19922e0aa 100644 --- a/tests/end-to-end/execution-order/depends-multiple-parameter-with-isolation.phpt +++ b/tests/end-to-end/execution-order/depends-multiple-parameter-with-isolation.phpt @@ -5,7 +5,7 @@ phpunit --process-isolation _files/MultiDependencyTest.php $_SERVER['argv'][] = '--do-not-cache-result'; $_SERVER['argv'][] = '--no-configuration'; $_SERVER['argv'][] = '--process-isolation'; -$_SERVER['argv'][] = \realpath(__DIR__ . '/_files/MultiDependencyTest.php'); +$_SERVER['argv'][] = __DIR__ . '/../../_files/MultiDependencyTest.php'; require_once __DIR__ . '/../../bootstrap.php'; diff --git a/tests/end-to-end/execution-order/depends-multiple-parameters.phpt b/tests/end-to-end/execution-order/depends-multiple-parameters.phpt index 99f71a43d19..02c6884b487 100644 --- a/tests/end-to-end/execution-order/depends-multiple-parameters.phpt +++ b/tests/end-to-end/execution-order/depends-multiple-parameters.phpt @@ -4,7 +4,7 @@ phpunit _files/MultiDependencyTest.php + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +require __DIR__ . '/Foo.php'; + +require __DIR__ . '/Bar.php'; diff --git a/tests/end-to-end/testdox/metadata-with-placeholders-data-provider-with-numeric-data-set-name-colorized.phpt b/tests/end-to-end/testdox/metadata-with-placeholders-data-provider-with-numeric-data-set-name-colorized.phpt index 89477ada8dd..b7fc160f2c7 100644 --- a/tests/end-to-end/testdox/metadata-with-placeholders-data-provider-with-numeric-data-set-name-colorized.phpt +++ b/tests/end-to-end/testdox/metadata-with-placeholders-data-provider-with-numeric-data-set-name-colorized.phpt @@ -4,6 +4,8 @@ TestDox: Default output; Data Provider with numeric data set name; TestDox metad Date: Tue, 8 Oct 2024 11:12:24 +0200 Subject: [PATCH 2/3] Simplify --- .../do-not-fail-on-empty-test-suite-by-default.phpt | 10 +--------- tests/end-to-end/cli/fail-on/fail-on-deprecation.phpt | 10 +--------- .../cli/fail-on/fail-on-empty-test-suite.phpt | 10 +--------- tests/end-to-end/cli/fail-on/fail-on-incomplete.phpt | 10 +--------- tests/end-to-end/cli/fail-on/fail-on-notice.phpt | 10 +--------- .../cli/fail-on/fail-on-phpunit-deprecation.phpt | 10 +--------- tests/end-to-end/cli/fail-on/fail-on-risky.phpt | 10 +--------- tests/end-to-end/cli/fail-on/fail-on-skipped.phpt | 10 +--------- tests/end-to-end/cli/fail-on/fail-on-warning.phpt | 10 +--------- .../cli/filter/filter-class-match-argument.phpt | 10 +--------- .../cli/filter/filter-class-match-configuration.phpt | 10 +--------- .../cli/filter/filter-class-nomatch-argument.phpt | 10 +--------- .../cli/filter/filter-class-nomatch-configuration.phpt | 10 +--------- .../cli/filter/filter-method-match-argument.phpt | 10 +--------- .../cli/filter/filter-method-match-configuration.phpt | 10 +--------- .../cli/filter/filter-method-nomatch-argument.phpt | 10 +--------- .../filter/filter-method-nomatch-configuration.phpt | 10 +--------- tests/end-to-end/cli/group/covers.phpt | 10 +--------- tests/end-to-end/cli/group/exclude-group-argument.phpt | 10 +--------- .../cli/group/exclude-group-configuration.phpt | 10 +--------- tests/end-to-end/cli/group/group-argument.phpt | 10 +--------- tests/end-to-end/cli/group/group-configuration.phpt | 10 +--------- tests/end-to-end/cli/group/uses.phpt | 10 +--------- .../cli/stop-on/stop-on-defect-for-error.phpt | 10 +--------- .../cli/stop-on/stop-on-defect-for-failure.phpt | 10 +--------- .../cli/stop-on/stop-on-defect-for-risky.phpt | 10 +--------- .../cli/stop-on/stop-on-defect-for-warning.phpt | 10 +--------- tests/end-to-end/cli/stop-on/stop-on-deprecation.phpt | 10 +--------- tests/end-to-end/cli/stop-on/stop-on-error.phpt | 10 +--------- tests/end-to-end/cli/stop-on/stop-on-failure.phpt | 10 +--------- tests/end-to-end/cli/stop-on/stop-on-incomplete.phpt | 10 +--------- tests/end-to-end/cli/stop-on/stop-on-notice.phpt | 10 +--------- tests/end-to-end/cli/stop-on/stop-on-risky.phpt | 10 +--------- tests/end-to-end/cli/stop-on/stop-on-skipped.phpt | 10 +--------- tests/end-to-end/cli/stop-on/stop-on-warning.phpt | 10 +--------- tests/end-to-end/event/assert-failure.phpt | 10 +--------- .../event/assertion-failure-in-after-test-method.phpt | 10 +--------- .../event/assertion-failure-in-before-test-method.phpt | 10 +--------- .../assertion-failure-in-postcondition-method.phpt | 10 +--------- .../assertion-failure-in-precondition-method.phpt | 10 +--------- .../event/assertion-failure-in-test-method.phpt | 10 +--------- tests/end-to-end/event/custom-comparator.phpt | 10 +--------- ...red-in-bootstrap-is-not-overwritten-by-phpunit.phpt | 10 +--------- .../end-to-end/event/data-provider-duplicate-key.phpt | 10 +--------- tests/end-to-end/event/data-provider-empty.phpt | 10 +--------- tests/end-to-end/event/data-provider-exception.phpt | 10 +--------- .../event/data-provider-expects-argument.phpt | 10 +--------- tests/end-to-end/event/data-provider-external.phpt | 10 +--------- .../event/data-provider-invalid-argument-name.phpt | 10 +--------- tests/end-to-end/event/data-provider-not-public.phpt | 10 +--------- tests/end-to-end/event/data-provider-not-static.phpt | 10 +--------- tests/end-to-end/event/data-provider.phpt | 10 +--------- .../deprecations-can-be-ignored-using-attribute.phpt | 10 +--------- tests/end-to-end/event/duplicated-cli-options.phpt | 10 +--------- .../event/error-handler-can-be-disabled.phpt | 10 +--------- tests/end-to-end/event/error.phpt | 10 +--------- .../event/exception-in-setup-before-class.phpt | 10 +--------- tests/end-to-end/event/exception-in-setup.phpt | 10 +--------- tests/end-to-end/event/expectation-on-output.phpt | 10 +--------- tests/end-to-end/event/failed-mock-expectation.phpt | 10 +--------- tests/end-to-end/event/incomplete-test.phpt | 10 +--------- tests/end-to-end/event/invalid-coverage-metadata.phpt | 10 +--------- .../event/invalid-data-provider-with-passing-test.phpt | 10 +--------- tests/end-to-end/event/invalid-data-provider.phpt | 10 +--------- tests/end-to-end/event/invalid-test-dependency.phpt | 10 +--------- tests/end-to-end/event/missing-test-dependency.phpt | 10 +--------- tests/end-to-end/event/mock-object.phpt | 10 +--------- tests/end-to-end/event/php-deprecated.phpt | 10 +--------- tests/end-to-end/event/php-notice.phpt | 10 +--------- tests/end-to-end/event/php-warning.phpt | 10 +--------- tests/end-to-end/event/phpt-skipif.phpt | 10 +--------- tests/end-to-end/event/phpunit-deprecated.phpt | 10 +--------- tests/end-to-end/event/phpunit-warning.phpt | 10 +--------- tests/end-to-end/event/process-isolation-fatal.phpt | 10 +--------- .../end-to-end/event/registered-failure-interface.phpt | 10 +--------- .../end-to-end/event/risky-depends-on-larger-test.phpt | 10 +--------- .../event/risky-global-state-modification.phpt | 10 +--------- .../event/risky-no-assertions-isolation.phpt | 10 +--------- tests/end-to-end/event/risky-no-assertions.phpt | 10 +--------- tests/end-to-end/event/risky-output.phpt | 10 +--------- tests/end-to-end/event/risky-time-limit-exceeded.phpt | 10 +--------- .../end-to-end/event/risky-with-multiple-reasons.phpt | 10 +--------- tests/end-to-end/event/success-process-isolation.phpt | 10 +--------- tests/end-to-end/event/success.phpt | 10 +--------- .../end-to-end/event/successful-mock-expectation.phpt | 10 +--------- tests/end-to-end/event/suppressed-user-notice.phpt | 10 +--------- tests/end-to-end/event/suppressed-user-warning.phpt | 10 +--------- tests/end-to-end/event/template-methods-isolation.phpt | 10 +--------- tests/end-to-end/event/template-methods.phpt | 10 +--------- .../event/test-skipped-in-setup-before-class.phpt | 10 +--------- tests/end-to-end/event/test-skipped-in-setup.phpt | 10 +--------- tests/end-to-end/event/test-skipped.phpt | 10 +--------- tests/end-to-end/event/test-stub.phpt | 10 +--------- tests/end-to-end/event/testwith-annotation.phpt | 10 +--------- tests/end-to-end/event/testwith-attribute.phpt | 10 +--------- tests/end-to-end/event/too-few-columns.phpt | 10 +--------- .../unexpected-end-of-test-in-separate-process.phpt | 10 +--------- .../unsatisfied-requirement-before-class-method.phpt | 10 +--------- .../event/unsatisfied-requirement-class.phpt | 10 +--------- .../event/unsatisfied-requirement-method.phpt | 10 +--------- tests/end-to-end/event/user-deprecated.phpt | 10 +--------- tests/end-to-end/event/user-error-php-84.phpt | 10 +--------- tests/end-to-end/event/user-error.phpt | 10 +--------- tests/end-to-end/event/user-notice.phpt | 10 +--------- tests/end-to-end/event/user-warning.phpt | 10 +--------- tests/end-to-end/extension/phar-extension.phpt | 10 +--------- .../generic/controlled-garbage-collection.phpt | 10 +--------- ...ethod-configured-with-annotation-and-attribute.phpt | 10 +--------- .../before-test-method-configured-with-annotation.phpt | 10 +--------- .../before-test-method-configured-with-attribute.phpt | 10 +--------- tests/end-to-end/regression/5287.phpt | 10 +--------- tests/end-to-end/regression/5498.phpt | 10 +--------- 112 files changed, 112 insertions(+), 1008 deletions(-) diff --git a/tests/end-to-end/cli/fail-on/do-not-fail-on-empty-test-suite-by-default.phpt b/tests/end-to-end/cli/fail-on/do-not-fail-on-empty-test-suite-by-default.phpt index 9031851c8d0..ce0f432b1bc 100644 --- a/tests/end-to-end/cli/fail-on/do-not-fail-on-empty-test-suite-by-default.phpt +++ b/tests/end-to-end/cli/fail-on/do-not-fail-on-empty-test-suite-by-default.phpt @@ -2,13 +2,9 @@ Test Runner exits with shell exit code indicating success by default when no tests were run --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/fail-on/fail-on-deprecation.phpt b/tests/end-to-end/cli/fail-on/fail-on-deprecation.phpt index 927a6ce4c6e..4ea1a90140f 100644 --- a/tests/end-to-end/cli/fail-on/fail-on-deprecation.phpt +++ b/tests/end-to-end/cli/fail-on/fail-on-deprecation.phpt @@ -2,23 +2,15 @@ Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test triggered a deprecation --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/fail-on/fail-on-empty-test-suite.phpt b/tests/end-to-end/cli/fail-on/fail-on-empty-test-suite.phpt index 7b140f1c315..02e52bad9d6 100644 --- a/tests/end-to-end/cli/fail-on/fail-on-empty-test-suite.phpt +++ b/tests/end-to-end/cli/fail-on/fail-on-empty-test-suite.phpt @@ -2,13 +2,9 @@ Test Runner exits with shell exit code indicating failure when no tests were run and --fail-on-empty-test-suite option is used --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/fail-on/fail-on-incomplete.phpt b/tests/end-to-end/cli/fail-on/fail-on-incomplete.phpt index 2b097d8143c..c8492375593 100644 --- a/tests/end-to-end/cli/fail-on/fail-on-incomplete.phpt +++ b/tests/end-to-end/cli/fail-on/fail-on-incomplete.phpt @@ -2,23 +2,15 @@ Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test was marked incomplete --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/fail-on/fail-on-notice.phpt b/tests/end-to-end/cli/fail-on/fail-on-notice.phpt index 9c33f36ee60..1a33a026321 100644 --- a/tests/end-to-end/cli/fail-on/fail-on-notice.phpt +++ b/tests/end-to-end/cli/fail-on/fail-on-notice.phpt @@ -2,23 +2,15 @@ Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test triggered a notice --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/fail-on/fail-on-phpunit-deprecation.phpt b/tests/end-to-end/cli/fail-on/fail-on-phpunit-deprecation.phpt index 1be5bf1e9bc..3ee7fd07d3a 100644 --- a/tests/end-to-end/cli/fail-on/fail-on-phpunit-deprecation.phpt +++ b/tests/end-to-end/cli/fail-on/fail-on-phpunit-deprecation.phpt @@ -2,23 +2,15 @@ Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test triggered a PHPUnit deprecation --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/fail-on/fail-on-risky.phpt b/tests/end-to-end/cli/fail-on/fail-on-risky.phpt index b3751755936..27cc550954e 100644 --- a/tests/end-to-end/cli/fail-on/fail-on-risky.phpt +++ b/tests/end-to-end/cli/fail-on/fail-on-risky.phpt @@ -2,23 +2,15 @@ Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test was considered risky --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/fail-on/fail-on-skipped.phpt b/tests/end-to-end/cli/fail-on/fail-on-skipped.phpt index fb5aa9ac6f8..71b231c5c53 100644 --- a/tests/end-to-end/cli/fail-on/fail-on-skipped.phpt +++ b/tests/end-to-end/cli/fail-on/fail-on-skipped.phpt @@ -2,23 +2,15 @@ Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test was skipped --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/fail-on/fail-on-warning.phpt b/tests/end-to-end/cli/fail-on/fail-on-warning.phpt index 75cf1cb3af8..bf4889cd213 100644 --- a/tests/end-to-end/cli/fail-on/fail-on-warning.phpt +++ b/tests/end-to-end/cli/fail-on/fail-on-warning.phpt @@ -2,23 +2,15 @@ Test Runner exits with shell exit code indicating failure when all tests are successful but at least one warning was triggered --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/filter/filter-class-match-argument.phpt b/tests/end-to-end/cli/filter/filter-class-match-argument.phpt index 06c33d4e494..5dd2fba966f 100644 --- a/tests/end-to-end/cli/filter/filter-class-match-argument.phpt +++ b/tests/end-to-end/cli/filter/filter-class-match-argument.phpt @@ -2,13 +2,9 @@ phpunit --filter FooTest tests/FooTest.php --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/filter/filter-class-match-configuration.phpt b/tests/end-to-end/cli/filter/filter-class-match-configuration.phpt index 8903825cade..fc4fd8240c5 100644 --- a/tests/end-to-end/cli/filter/filter-class-match-configuration.phpt +++ b/tests/end-to-end/cli/filter/filter-class-match-configuration.phpt @@ -2,24 +2,16 @@ phpunit --filter FooTest --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/filter/filter-class-nomatch-argument.phpt b/tests/end-to-end/cli/filter/filter-class-nomatch-argument.phpt index c3993e0a0d2..e94bd8e1359 100644 --- a/tests/end-to-end/cli/filter/filter-class-nomatch-argument.phpt +++ b/tests/end-to-end/cli/filter/filter-class-nomatch-argument.phpt @@ -2,13 +2,9 @@ phpunit --filter BarTest tests/FooTest.php --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/filter/filter-class-nomatch-configuration.phpt b/tests/end-to-end/cli/filter/filter-class-nomatch-configuration.phpt index e16d8204c86..ea025347eed 100644 --- a/tests/end-to-end/cli/filter/filter-class-nomatch-configuration.phpt +++ b/tests/end-to-end/cli/filter/filter-class-nomatch-configuration.phpt @@ -2,24 +2,16 @@ phpunit --filter BarTest --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/filter/filter-method-match-argument.phpt b/tests/end-to-end/cli/filter/filter-method-match-argument.phpt index 984410e891a..2a60ce8be3c 100644 --- a/tests/end-to-end/cli/filter/filter-method-match-argument.phpt +++ b/tests/end-to-end/cli/filter/filter-method-match-argument.phpt @@ -2,13 +2,9 @@ phpunit --filter testOne tests/FooTest.php --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/filter/filter-method-match-configuration.phpt b/tests/end-to-end/cli/filter/filter-method-match-configuration.phpt index 16559f3fe1f..4dba4fe939f 100644 --- a/tests/end-to-end/cli/filter/filter-method-match-configuration.phpt +++ b/tests/end-to-end/cli/filter/filter-method-match-configuration.phpt @@ -2,24 +2,16 @@ phpunit --filter testOne --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/filter/filter-method-nomatch-argument.phpt b/tests/end-to-end/cli/filter/filter-method-nomatch-argument.phpt index 54c91fffb6d..6aebb3664f7 100644 --- a/tests/end-to-end/cli/filter/filter-method-nomatch-argument.phpt +++ b/tests/end-to-end/cli/filter/filter-method-nomatch-argument.phpt @@ -2,13 +2,9 @@ phpunit --filter testFoo tests/FooTest.php --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/filter/filter-method-nomatch-configuration.phpt b/tests/end-to-end/cli/filter/filter-method-nomatch-configuration.phpt index 30026c22b01..a7fb437ac8a 100644 --- a/tests/end-to-end/cli/filter/filter-method-nomatch-configuration.phpt +++ b/tests/end-to-end/cli/filter/filter-method-nomatch-configuration.phpt @@ -2,24 +2,16 @@ phpunit --filter testFoo --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/group/covers.phpt b/tests/end-to-end/cli/group/covers.phpt index 94f3daa1b91..be8d7726286 100644 --- a/tests/end-to-end/cli/group/covers.phpt +++ b/tests/end-to-end/cli/group/covers.phpt @@ -2,13 +2,9 @@ phpunit --covers PHPUnit\TestFixture\CoversUsesFiltering\Foo --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/group/exclude-group-argument.phpt b/tests/end-to-end/cli/group/exclude-group-argument.phpt index bc5d62708be..7c2a4cd7489 100644 --- a/tests/end-to-end/cli/group/exclude-group-argument.phpt +++ b/tests/end-to-end/cli/group/exclude-group-argument.phpt @@ -2,13 +2,9 @@ phpunit --exclude-group one,two tests/FooTest.php --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/group/exclude-group-configuration.phpt b/tests/end-to-end/cli/group/exclude-group-configuration.phpt index a3540d59aa3..ef36749a6d6 100644 --- a/tests/end-to-end/cli/group/exclude-group-configuration.phpt +++ b/tests/end-to-end/cli/group/exclude-group-configuration.phpt @@ -2,12 +2,8 @@ phpunit --exclude-group one,two --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/group/group-argument.phpt b/tests/end-to-end/cli/group/group-argument.phpt index 31d1eb834a6..bda4ec54cec 100644 --- a/tests/end-to-end/cli/group/group-argument.phpt +++ b/tests/end-to-end/cli/group/group-argument.phpt @@ -2,13 +2,9 @@ phpunit --group one tests/FooTest.php --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/group/group-configuration.phpt b/tests/end-to-end/cli/group/group-configuration.phpt index 759ecd4860f..f8bef7762ce 100644 --- a/tests/end-to-end/cli/group/group-configuration.phpt +++ b/tests/end-to-end/cli/group/group-configuration.phpt @@ -2,24 +2,16 @@ phpunit --group one --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/group/uses.phpt b/tests/end-to-end/cli/group/uses.phpt index 8d7d1706749..9c2b6d8d0f9 100644 --- a/tests/end-to-end/cli/group/uses.phpt +++ b/tests/end-to-end/cli/group/uses.phpt @@ -2,13 +2,9 @@ phpunit --uses PHPUnit\TestFixture\CoversUsesFiltering\Foo --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-defect-for-error.phpt b/tests/end-to-end/cli/stop-on/stop-on-defect-for-error.phpt index 51cef31248f..7b368ddafa9 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-defect-for-error.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-defect-for-error.phpt @@ -2,23 +2,15 @@ Stopping test execution after first error works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-defect-for-failure.phpt b/tests/end-to-end/cli/stop-on/stop-on-defect-for-failure.phpt index fad33940980..5c63c4ae783 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-defect-for-failure.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-defect-for-failure.phpt @@ -2,23 +2,15 @@ Stopping test execution after first failure works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-defect-for-risky.phpt b/tests/end-to-end/cli/stop-on/stop-on-defect-for-risky.phpt index 201d90eeb30..7d490cfc0eb 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-defect-for-risky.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-defect-for-risky.phpt @@ -2,23 +2,15 @@ Stopping test execution after first risky test works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-defect-for-warning.phpt b/tests/end-to-end/cli/stop-on/stop-on-defect-for-warning.phpt index 8365ec629b7..cd01ec83fe0 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-defect-for-warning.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-defect-for-warning.phpt @@ -2,23 +2,15 @@ Stopping test execution after first warning works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-deprecation.phpt b/tests/end-to-end/cli/stop-on/stop-on-deprecation.phpt index a80db29c518..143c7caf7eb 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-deprecation.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-deprecation.phpt @@ -2,23 +2,15 @@ Stopping test execution after first deprecation works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-error.phpt b/tests/end-to-end/cli/stop-on/stop-on-error.phpt index 658f7385f0b..e4338279dbd 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-error.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-error.phpt @@ -2,23 +2,15 @@ Stopping test execution after first error works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-failure.phpt b/tests/end-to-end/cli/stop-on/stop-on-failure.phpt index 83d3c9b8966..8c7d97e0fde 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-failure.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-failure.phpt @@ -2,23 +2,15 @@ Stopping test execution after first failure works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-incomplete.phpt b/tests/end-to-end/cli/stop-on/stop-on-incomplete.phpt index 1a0182cf390..d7db78b3422 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-incomplete.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-incomplete.phpt @@ -2,23 +2,15 @@ Stopping test execution after first incomplete test works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-notice.phpt b/tests/end-to-end/cli/stop-on/stop-on-notice.phpt index d89f44454a4..132816634fb 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-notice.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-notice.phpt @@ -2,23 +2,15 @@ Stopping test execution after first notice works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-risky.phpt b/tests/end-to-end/cli/stop-on/stop-on-risky.phpt index 2e4571ec34a..69d0efa06a4 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-risky.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-risky.phpt @@ -2,23 +2,15 @@ Stopping test execution after first risky test works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-skipped.phpt b/tests/end-to-end/cli/stop-on/stop-on-skipped.phpt index 76d00edfe5e..de2d39fca2b 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-skipped.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-skipped.phpt @@ -2,23 +2,15 @@ Stopping test execution after first skipped test works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/cli/stop-on/stop-on-warning.phpt b/tests/end-to-end/cli/stop-on/stop-on-warning.phpt index ec0d6a6efdd..ba649f163e9 100644 --- a/tests/end-to-end/cli/stop-on/stop-on-warning.phpt +++ b/tests/end-to-end/cli/stop-on/stop-on-warning.phpt @@ -2,23 +2,15 @@ Stopping test execution after first warning works --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/assert-failure.phpt b/tests/end-to-end/event/assert-failure.phpt index 25c7be9de7a..072e7814c57 100644 --- a/tests/end-to-end/event/assert-failure.phpt +++ b/tests/end-to-end/event/assert-failure.phpt @@ -11,22 +11,14 @@ if (ini_get('assert.exception') != 1) { } --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/assertion-failure-in-after-test-method.phpt b/tests/end-to-end/event/assertion-failure-in-after-test-method.phpt index 407f33ba6a3..c5dc0c80098 100644 --- a/tests/end-to-end/event/assertion-failure-in-after-test-method.phpt +++ b/tests/end-to-end/event/assertion-failure-in-after-test-method.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that fails because of an assertion failure in a "after test" method --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/assertion-failure-in-before-test-method.phpt b/tests/end-to-end/event/assertion-failure-in-before-test-method.phpt index 5388693fb23..be829c10e51 100644 --- a/tests/end-to-end/event/assertion-failure-in-before-test-method.phpt +++ b/tests/end-to-end/event/assertion-failure-in-before-test-method.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that fails because of an assertion failure in a "before test" method --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/assertion-failure-in-postcondition-method.phpt b/tests/end-to-end/event/assertion-failure-in-postcondition-method.phpt index 322ab25a00d..67ef6c1247c 100644 --- a/tests/end-to-end/event/assertion-failure-in-postcondition-method.phpt +++ b/tests/end-to-end/event/assertion-failure-in-postcondition-method.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that fails because of an assertion failure in a "post condition" method --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/assertion-failure-in-precondition-method.phpt b/tests/end-to-end/event/assertion-failure-in-precondition-method.phpt index 06349f28ab9..555f8c4ca0a 100644 --- a/tests/end-to-end/event/assertion-failure-in-precondition-method.phpt +++ b/tests/end-to-end/event/assertion-failure-in-precondition-method.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that fails because of an assertion failure in a "pre condition" method --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/assertion-failure-in-test-method.phpt b/tests/end-to-end/event/assertion-failure-in-test-method.phpt index 6a44274fef9..124895f646a 100644 --- a/tests/end-to-end/event/assertion-failure-in-test-method.phpt +++ b/tests/end-to-end/event/assertion-failure-in-test-method.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that fails because of an assertion failure in the test method --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/custom-comparator.phpt b/tests/end-to-end/event/custom-comparator.phpt index 8a3978979b6..fd05418b3ab 100644 --- a/tests/end-to-end/event/custom-comparator.phpt +++ b/tests/end-to-end/event/custom-comparator.phpt @@ -2,24 +2,16 @@ The right events are emitted in the right order for a successful test that uses assertEquals() with a custom comparator --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/custom-error-handler-registered-in-bootstrap-is-not-overwritten-by-phpunit.phpt b/tests/end-to-end/event/custom-error-handler-registered-in-bootstrap-is-not-overwritten-by-phpunit.phpt index 8f4cd00ebad..d2aad4001d8 100644 --- a/tests/end-to-end/event/custom-error-handler-registered-in-bootstrap-is-not-overwritten-by-phpunit.phpt +++ b/tests/end-to-end/event/custom-error-handler-registered-in-bootstrap-is-not-overwritten-by-phpunit.phpt @@ -2,23 +2,15 @@ A custom error handler registered in the test suite's bootstrap script using set_error_handler() is not overwritten by PHPUnit by default --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/data-provider-duplicate-key.phpt b/tests/end-to-end/event/data-provider-duplicate-key.phpt index 4fa48f82cda..e94e48b0b11 100644 --- a/tests/end-to-end/event/data-provider-duplicate-key.phpt +++ b/tests/end-to-end/event/data-provider-duplicate-key.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that uses a data provider that provides data with duplicate keys --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/data-provider-empty.phpt b/tests/end-to-end/event/data-provider-empty.phpt index 4e028a1782e..afbb0e23d63 100644 --- a/tests/end-to-end/event/data-provider-empty.phpt +++ b/tests/end-to-end/event/data-provider-empty.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that uses a data provider that provides no data --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/data-provider-exception.phpt b/tests/end-to-end/event/data-provider-exception.phpt index 49713099035..63f85ef1be3 100644 --- a/tests/end-to-end/event/data-provider-exception.phpt +++ b/tests/end-to-end/event/data-provider-exception.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that uses a data provider that raises an exception --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/data-provider-expects-argument.phpt b/tests/end-to-end/event/data-provider-expects-argument.phpt index bab5ef771e9..def83779594 100644 --- a/tests/end-to-end/event/data-provider-expects-argument.phpt +++ b/tests/end-to-end/event/data-provider-expects-argument.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that uses a data provider that expects an argument --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/data-provider-external.phpt b/tests/end-to-end/event/data-provider-external.phpt index bca0013e479..ab287a8bcfc 100644 --- a/tests/end-to-end/event/data-provider-external.phpt +++ b/tests/end-to-end/event/data-provider-external.phpt @@ -2,24 +2,16 @@ The right events are emitted in the right order for a successful test that uses a data provider method in a different class --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/data-provider-invalid-argument-name.phpt b/tests/end-to-end/event/data-provider-invalid-argument-name.phpt index f799709614c..a467e544997 100644 --- a/tests/end-to-end/event/data-provider-invalid-argument-name.phpt +++ b/tests/end-to-end/event/data-provider-invalid-argument-name.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that uses a data provider that provides data with invalid argument names --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/data-provider-not-public.phpt b/tests/end-to-end/event/data-provider-not-public.phpt index f206a4250ae..a3f88beba27 100644 --- a/tests/end-to-end/event/data-provider-not-public.phpt +++ b/tests/end-to-end/event/data-provider-not-public.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that uses a data provider that is not public --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/data-provider-not-static.phpt b/tests/end-to-end/event/data-provider-not-static.phpt index 1447664531a..e94e680c16a 100644 --- a/tests/end-to-end/event/data-provider-not-static.phpt +++ b/tests/end-to-end/event/data-provider-not-static.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that uses a data provider that is not static --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/data-provider.phpt b/tests/end-to-end/event/data-provider.phpt index ae14306243b..d2ccf7ed7bd 100644 --- a/tests/end-to-end/event/data-provider.phpt +++ b/tests/end-to-end/event/data-provider.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a successful test that uses a data provider --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/deprecations-can-be-ignored-using-attribute.phpt b/tests/end-to-end/event/deprecations-can-be-ignored-using-attribute.phpt index 6aafadb6794..8a5447acefc 100644 --- a/tests/end-to-end/event/deprecations-can-be-ignored-using-attribute.phpt +++ b/tests/end-to-end/event/deprecations-can-be-ignored-using-attribute.phpt @@ -2,22 +2,14 @@ https://github.com/sebastianbergmann/phpunit/issues/5532 --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/duplicated-cli-options.phpt b/tests/end-to-end/event/duplicated-cli-options.phpt index 78ad1ccee32..10c71298948 100644 --- a/tests/end-to-end/event/duplicated-cli-options.phpt +++ b/tests/end-to-end/event/duplicated-cli-options.phpt @@ -2,13 +2,9 @@ The right events are emitted in the right order when duplicated CLI options are used --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Triggered Warning (Option --filter cannot be used more than once) diff --git a/tests/end-to-end/event/error-handler-can-be-disabled.phpt b/tests/end-to-end/event/error-handler-can-be-disabled.phpt index 6b11f6fd320..0d80e6c2579 100644 --- a/tests/end-to-end/event/error-handler-can-be-disabled.phpt +++ b/tests/end-to-end/event/error-handler-can-be-disabled.phpt @@ -2,12 +2,8 @@ The right events are emitted in the right order when PHPUnit's error handler is disabled --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/error.phpt b/tests/end-to-end/event/error.phpt index 20da02dbb22..8b0ea1bfa38 100644 --- a/tests/end-to-end/event/error.phpt +++ b/tests/end-to-end/event/error.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for an errored test --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/exception-in-setup-before-class.phpt b/tests/end-to-end/event/exception-in-setup-before-class.phpt index ed370bd55c8..102c9c181cf 100644 --- a/tests/end-to-end/event/exception-in-setup-before-class.phpt +++ b/tests/end-to-end/event/exception-in-setup-before-class.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for when an exception is raised in setUpBeforeClass() --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/exception-in-setup.phpt b/tests/end-to-end/event/exception-in-setup.phpt index 51db1fa52ed..9a313bb61dd 100644 --- a/tests/end-to-end/event/exception-in-setup.phpt +++ b/tests/end-to-end/event/exception-in-setup.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for when an exception is raised in setUp() --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/expectation-on-output.phpt b/tests/end-to-end/event/expectation-on-output.phpt index dd3606f8f96..54530b14a45 100644 --- a/tests/end-to-end/event/expectation-on-output.phpt +++ b/tests/end-to-end/event/expectation-on-output.phpt @@ -2,23 +2,15 @@ The right events are emitted in the right order for a test with an output expectation --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/failed-mock-expectation.phpt b/tests/end-to-end/event/failed-mock-expectation.phpt index 226b7400782..b64d36bbaad 100644 --- a/tests/end-to-end/event/failed-mock-expectation.phpt +++ b/tests/end-to-end/event/failed-mock-expectation.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test with a failed expectation on a mock object --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/incomplete-test.phpt b/tests/end-to-end/event/incomplete-test.phpt index 7d16b083fb6..978eee6ccfc 100644 --- a/tests/end-to-end/event/incomplete-test.phpt +++ b/tests/end-to-end/event/incomplete-test.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for an incomplete test --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/invalid-coverage-metadata.phpt b/tests/end-to-end/event/invalid-coverage-metadata.phpt index 40f9e7eb45f..e1c58704c8a 100644 --- a/tests/end-to-end/event/invalid-coverage-metadata.phpt +++ b/tests/end-to-end/event/invalid-coverage-metadata.phpt @@ -7,23 +7,15 @@ if (!extension_loaded('pcov')) { } --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/invalid-data-provider-with-passing-test.phpt b/tests/end-to-end/event/invalid-data-provider-with-passing-test.phpt index 7f427f4fa2d..b337c131f4d 100644 --- a/tests/end-to-end/event/invalid-data-provider-with-passing-test.phpt +++ b/tests/end-to-end/event/invalid-data-provider-with-passing-test.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that uses a data provider that returns an invalid array --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/invalid-data-provider.phpt b/tests/end-to-end/event/invalid-data-provider.phpt index ee6c60a4600..9662c0c6240 100644 --- a/tests/end-to-end/event/invalid-data-provider.phpt +++ b/tests/end-to-end/event/invalid-data-provider.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that uses a data provider that returns an invalid array --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/invalid-test-dependency.phpt b/tests/end-to-end/event/invalid-test-dependency.phpt index 2ddff04bc74..72b2d86eeda 100644 --- a/tests/end-to-end/event/invalid-test-dependency.phpt +++ b/tests/end-to-end/event/invalid-test-dependency.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that has an invalid dependency --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/missing-test-dependency.phpt b/tests/end-to-end/event/missing-test-dependency.phpt index f632db9b589..b0d5cda606b 100644 --- a/tests/end-to-end/event/missing-test-dependency.phpt +++ b/tests/end-to-end/event/missing-test-dependency.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that has a missing dependency --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/mock-object.phpt b/tests/end-to-end/event/mock-object.phpt index ba827130a2b..b43d712d763 100644 --- a/tests/end-to-end/event/mock-object.phpt +++ b/tests/end-to-end/event/mock-object.phpt @@ -2,24 +2,16 @@ The right events are emitted in the right order for a test that uses a mock object --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/php-deprecated.phpt b/tests/end-to-end/event/php-deprecated.phpt index f12146d5bef..5a5a29040a5 100644 --- a/tests/end-to-end/event/php-deprecated.phpt +++ b/tests/end-to-end/event/php-deprecated.phpt @@ -4,23 +4,15 @@ The right events are emitted in the right order for a test that runs code which error_reporting=-1 --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/php-notice.phpt b/tests/end-to-end/event/php-notice.phpt index a24e6f59e15..1cc98fef860 100644 --- a/tests/end-to-end/event/php-notice.phpt +++ b/tests/end-to-end/event/php-notice.phpt @@ -2,23 +2,15 @@ The right events are emitted in the right order for a test that runs code which triggers E_NOTICE --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/php-warning.phpt b/tests/end-to-end/event/php-warning.phpt index 01aea0c6f9f..aa02375adbc 100644 --- a/tests/end-to-end/event/php-warning.phpt +++ b/tests/end-to-end/event/php-warning.phpt @@ -2,23 +2,15 @@ The right events are emitted in the right order for a test that runs code which triggers E_WARNING --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/phpt-skipif.phpt b/tests/end-to-end/event/phpt-skipif.phpt index a4a08178508..1fbf0db1f6d 100644 --- a/tests/end-to-end/event/phpt-skipif.phpt +++ b/tests/end-to-end/event/phpt-skipif.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a skipped PHPT test --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/phpunit-deprecated.phpt b/tests/end-to-end/event/phpunit-deprecated.phpt index d5ccaaa6fc2..417c9a7dec1 100644 --- a/tests/end-to-end/event/phpunit-deprecated.phpt +++ b/tests/end-to-end/event/phpunit-deprecated.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that uses a deprecated PHPUnit feature --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/phpunit-warning.phpt b/tests/end-to-end/event/phpunit-warning.phpt index 29c76cf2868..4e178a119dd 100644 --- a/tests/end-to-end/event/phpunit-warning.phpt +++ b/tests/end-to-end/event/phpunit-warning.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that runs code which triggers a PHPUnit warning --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/process-isolation-fatal.phpt b/tests/end-to-end/event/process-isolation-fatal.phpt index 7b197f02890..a707b21da67 100644 --- a/tests/end-to-end/event/process-isolation-fatal.phpt +++ b/tests/end-to-end/event/process-isolation-fatal.phpt @@ -2,23 +2,15 @@ The right events are emitted in the right order for a test that is run in process isolation and triggers a fatal error --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/registered-failure-interface.phpt b/tests/end-to-end/event/registered-failure-interface.phpt index 401e5e3f213..22ef8531d3d 100644 --- a/tests/end-to-end/event/registered-failure-interface.phpt +++ b/tests/end-to-end/event/registered-failure-interface.phpt @@ -2,24 +2,16 @@ The right events are emitted in the right order for a test that registers a failure interface --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/risky-depends-on-larger-test.phpt b/tests/end-to-end/event/risky-depends-on-larger-test.phpt index 9e9028238a2..cefa6d9d611 100644 --- a/tests/end-to-end/event/risky-depends-on-larger-test.phpt +++ b/tests/end-to-end/event/risky-depends-on-larger-test.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that is considered risky because it depends on a larger test --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/risky-global-state-modification.phpt b/tests/end-to-end/event/risky-global-state-modification.phpt index 3ae618af029..248c5804499 100644 --- a/tests/end-to-end/event/risky-global-state-modification.phpt +++ b/tests/end-to-end/event/risky-global-state-modification.phpt @@ -2,24 +2,16 @@ The right events are emitted in the right order for a test that is considered risky because it modified global state --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/risky-no-assertions-isolation.phpt b/tests/end-to-end/event/risky-no-assertions-isolation.phpt index a17cc1eb4a2..0fd7b1f6e1c 100644 --- a/tests/end-to-end/event/risky-no-assertions-isolation.phpt +++ b/tests/end-to-end/event/risky-no-assertions-isolation.phpt @@ -2,23 +2,15 @@ The right events are emitted in the right order for a test that is run in an isolated process and is considered risky because it did not perform assertions --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/risky-no-assertions.phpt b/tests/end-to-end/event/risky-no-assertions.phpt index 8b61821e9ea..878df0d1dbd 100644 --- a/tests/end-to-end/event/risky-no-assertions.phpt +++ b/tests/end-to-end/event/risky-no-assertions.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that is considered risky because it did not perform assertions --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/risky-output.phpt b/tests/end-to-end/event/risky-output.phpt index 8eab9db710e..4808a7c6997 100644 --- a/tests/end-to-end/event/risky-output.phpt +++ b/tests/end-to-end/event/risky-output.phpt @@ -2,23 +2,15 @@ The right events are emitted in the right order for a test that is considered risky because it prints output --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/risky-time-limit-exceeded.phpt b/tests/end-to-end/event/risky-time-limit-exceeded.phpt index dc693b8b9b1..e9f82f913f0 100644 --- a/tests/end-to-end/event/risky-time-limit-exceeded.phpt +++ b/tests/end-to-end/event/risky-time-limit-exceeded.phpt @@ -5,23 +5,15 @@ The right events are emitted in the right order for a test that is considered ri if (!extension_loaded('pcntl')) echo 'skip: Extension pcntl is required'; --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/risky-with-multiple-reasons.phpt b/tests/end-to-end/event/risky-with-multiple-reasons.phpt index 958fb7b2fbd..ae18a50654c 100644 --- a/tests/end-to-end/event/risky-with-multiple-reasons.phpt +++ b/tests/end-to-end/event/risky-with-multiple-reasons.phpt @@ -2,24 +2,16 @@ The right events are emitted in the right order for a test that is considered risky for multiple reasons --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/success-process-isolation.phpt b/tests/end-to-end/event/success-process-isolation.phpt index 8707ba04b29..20af8a6d014 100644 --- a/tests/end-to-end/event/success-process-isolation.phpt +++ b/tests/end-to-end/event/success-process-isolation.phpt @@ -2,23 +2,15 @@ The right events are emitted in the right order for a successful test that is run in an isolated process --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/success.phpt b/tests/end-to-end/event/success.phpt index a92c64b4a46..26332a22c50 100644 --- a/tests/end-to-end/event/success.phpt +++ b/tests/end-to-end/event/success.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a successful test --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/successful-mock-expectation.phpt b/tests/end-to-end/event/successful-mock-expectation.phpt index 23c5f039255..38b283a334d 100644 --- a/tests/end-to-end/event/successful-mock-expectation.phpt +++ b/tests/end-to-end/event/successful-mock-expectation.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test with a successful expectation on a mock object --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/suppressed-user-notice.phpt b/tests/end-to-end/event/suppressed-user-notice.phpt index 8d73c0b6471..a23c1038ec3 100644 --- a/tests/end-to-end/event/suppressed-user-notice.phpt +++ b/tests/end-to-end/event/suppressed-user-notice.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that runs code which triggers a suppressed E_USER_NOTICE --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/suppressed-user-warning.phpt b/tests/end-to-end/event/suppressed-user-warning.phpt index 29f834d07c2..b17b0427f42 100644 --- a/tests/end-to-end/event/suppressed-user-warning.phpt +++ b/tests/end-to-end/event/suppressed-user-warning.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that runs code which triggers a suppressed E_USER_WARNING --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/template-methods-isolation.phpt b/tests/end-to-end/event/template-methods-isolation.phpt index cd6168d9ad0..ccecba8bd6d 100644 --- a/tests/end-to-end/event/template-methods-isolation.phpt +++ b/tests/end-to-end/event/template-methods-isolation.phpt @@ -2,23 +2,15 @@ The right events are emitted in the right order for the template methods of a test class that is run in process isolation --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/template-methods.phpt b/tests/end-to-end/event/template-methods.phpt index 3ea147bac8e..0682b07210a 100644 --- a/tests/end-to-end/event/template-methods.phpt +++ b/tests/end-to-end/event/template-methods.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for the template methods of a test class --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/test-skipped-in-setup-before-class.phpt b/tests/end-to-end/event/test-skipped-in-setup-before-class.phpt index db4059fdd7f..3cb9566887d 100644 --- a/tests/end-to-end/event/test-skipped-in-setup-before-class.phpt +++ b/tests/end-to-end/event/test-skipped-in-setup-before-class.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test skipped in setUpBeforeClass() --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/test-skipped-in-setup.phpt b/tests/end-to-end/event/test-skipped-in-setup.phpt index fa38c2474e2..4c7c5be7cbb 100644 --- a/tests/end-to-end/event/test-skipped-in-setup.phpt +++ b/tests/end-to-end/event/test-skipped-in-setup.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test skipped in setUp() --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/test-skipped.phpt b/tests/end-to-end/event/test-skipped.phpt index fe3b5b68eb7..440593dcdf1 100644 --- a/tests/end-to-end/event/test-skipped.phpt +++ b/tests/end-to-end/event/test-skipped.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a skipped test --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/test-stub.phpt b/tests/end-to-end/event/test-stub.phpt index 4c21b069711..f492e89e4e9 100644 --- a/tests/end-to-end/event/test-stub.phpt +++ b/tests/end-to-end/event/test-stub.phpt @@ -2,24 +2,16 @@ The right events are emitted in the right order for a test that uses a test stub --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/testwith-annotation.phpt b/tests/end-to-end/event/testwith-annotation.phpt index 843137cfc91..0cae1686db8 100644 --- a/tests/end-to-end/event/testwith-annotation.phpt +++ b/tests/end-to-end/event/testwith-annotation.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a successful test that uses the TestWith and TestWithJson attributes --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/testwith-attribute.phpt b/tests/end-to-end/event/testwith-attribute.phpt index 39fbad6913b..2f11a6654fd 100644 --- a/tests/end-to-end/event/testwith-attribute.phpt +++ b/tests/end-to-end/event/testwith-attribute.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a successful test that uses the TestWith and TestWithJson attributes --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/too-few-columns.phpt b/tests/end-to-end/event/too-few-columns.phpt index 4070afe1088..8bb52e94fa5 100644 --- a/tests/end-to-end/event/too-few-columns.phpt +++ b/tests/end-to-end/event/too-few-columns.phpt @@ -2,24 +2,16 @@ The right events are emitted in the right order when too few columns are requested --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Triggered Warning (Less than 16 columns requested, number of columns set to 16) diff --git a/tests/end-to-end/event/unexpected-end-of-test-in-separate-process.phpt b/tests/end-to-end/event/unexpected-end-of-test-in-separate-process.phpt index 6db60cc57ee..d2ef73bf9f1 100644 --- a/tests/end-to-end/event/unexpected-end-of-test-in-separate-process.phpt +++ b/tests/end-to-end/event/unexpected-end-of-test-in-separate-process.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test run in a separate process that ends unexpectedly --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/unsatisfied-requirement-before-class-method.phpt b/tests/end-to-end/event/unsatisfied-requirement-before-class-method.phpt index d3e7362272f..00828f9df2f 100644 --- a/tests/end-to-end/event/unsatisfied-requirement-before-class-method.phpt +++ b/tests/end-to-end/event/unsatisfied-requirement-before-class-method.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that has an unsatisfied requirement (before class method) --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/unsatisfied-requirement-class.phpt b/tests/end-to-end/event/unsatisfied-requirement-class.phpt index a77c09b9e8b..bec298dbd9e 100644 --- a/tests/end-to-end/event/unsatisfied-requirement-class.phpt +++ b/tests/end-to-end/event/unsatisfied-requirement-class.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that has an unsatisfied requirement (class level) --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/unsatisfied-requirement-method.phpt b/tests/end-to-end/event/unsatisfied-requirement-method.phpt index 586a7faab86..aedd643bab4 100644 --- a/tests/end-to-end/event/unsatisfied-requirement-method.phpt +++ b/tests/end-to-end/event/unsatisfied-requirement-method.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that has an unsatisfied requirement (method level) --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/user-deprecated.phpt b/tests/end-to-end/event/user-deprecated.phpt index e20f8423c5e..3d1688df693 100644 --- a/tests/end-to-end/event/user-deprecated.phpt +++ b/tests/end-to-end/event/user-deprecated.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that runs code which triggers E_USER_DEPRECATED --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/user-error-php-84.phpt b/tests/end-to-end/event/user-error-php-84.phpt index 46ca61c9b1f..8753c31e3f0 100644 --- a/tests/end-to-end/event/user-error-php-84.phpt +++ b/tests/end-to-end/event/user-error-php-84.phpt @@ -7,22 +7,14 @@ if (version_compare('8.4.0-dev', PHP_VERSION)) { } --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/user-error.phpt b/tests/end-to-end/event/user-error.phpt index a6684837ef3..9235338d749 100644 --- a/tests/end-to-end/event/user-error.phpt +++ b/tests/end-to-end/event/user-error.phpt @@ -7,22 +7,14 @@ if (version_compare(PHP_VERSION, '8.4.0-dev', '>=')) { } --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/user-notice.phpt b/tests/end-to-end/event/user-notice.phpt index d7e18c7dd54..a009989a879 100644 --- a/tests/end-to-end/event/user-notice.phpt +++ b/tests/end-to-end/event/user-notice.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that runs code which triggers an E_USER_NOTICE --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/event/user-warning.phpt b/tests/end-to-end/event/user-warning.phpt index 49624596b7b..2f753655075 100644 --- a/tests/end-to-end/event/user-warning.phpt +++ b/tests/end-to-end/event/user-warning.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a test that runs code which triggers E_USER_WARNING --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/extension/phar-extension.phpt b/tests/end-to-end/extension/phar-extension.phpt index e078b5c492a..9110c7089ae 100644 --- a/tests/end-to-end/extension/phar-extension.phpt +++ b/tests/end-to-end/extension/phar-extension.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order when a PHPUnit extension from a PHAR is loaded --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/generic/controlled-garbage-collection.phpt b/tests/end-to-end/generic/controlled-garbage-collection.phpt index d7882c052a0..d7bfaa26948 100644 --- a/tests/end-to-end/generic/controlled-garbage-collection.phpt +++ b/tests/end-to-end/generic/controlled-garbage-collection.phpt @@ -2,22 +2,14 @@ phpunit --configuration=__DIR__.'/../_files/controlled-garbage-collection' --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/metadata/before-test-method-configured-with-annotation-and-attribute.phpt b/tests/end-to-end/metadata/before-test-method-configured-with-annotation-and-attribute.phpt index 4ff3827fb7c..a6fe263aa08 100644 --- a/tests/end-to-end/metadata/before-test-method-configured-with-annotation-and-attribute.phpt +++ b/tests/end-to-end/metadata/before-test-method-configured-with-annotation-and-attribute.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a successful test that has a before-test method that is configured with annotation and attribute --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/metadata/before-test-method-configured-with-annotation.phpt b/tests/end-to-end/metadata/before-test-method-configured-with-annotation.phpt index 01bad2e6630..26d91aff8ec 100644 --- a/tests/end-to-end/metadata/before-test-method-configured-with-annotation.phpt +++ b/tests/end-to-end/metadata/before-test-method-configured-with-annotation.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a successful test that has a before-test method that is configured with annotation --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/metadata/before-test-method-configured-with-attribute.phpt b/tests/end-to-end/metadata/before-test-method-configured-with-attribute.phpt index d2263655584..b2acdf3672e 100644 --- a/tests/end-to-end/metadata/before-test-method-configured-with-attribute.phpt +++ b/tests/end-to-end/metadata/before-test-method-configured-with-attribute.phpt @@ -2,22 +2,14 @@ The right events are emitted in the right order for a successful test that has a before-test method that is configured with attribute --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/regression/5287.phpt b/tests/end-to-end/regression/5287.phpt index 3f55b208418..1a8709f7f16 100644 --- a/tests/end-to-end/regression/5287.phpt +++ b/tests/end-to-end/regression/5287.phpt @@ -2,24 +2,16 @@ https://github.com/sebastianbergmann/phpunit/issues/5287 --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured diff --git a/tests/end-to-end/regression/5498.phpt b/tests/end-to-end/regression/5498.phpt index f3e5272caa3..b25a1792b05 100644 --- a/tests/end-to-end/regression/5498.phpt +++ b/tests/end-to-end/regression/5498.phpt @@ -2,24 +2,16 @@ https://github.com/sebastianbergmann/phpunit/issues/5498 --FILE-- run($_SERVER['argv']); - -print file_get_contents($traceFile); - -unlink($traceFile); --EXPECTF-- PHPUnit Started (%s) Test Runner Configured From 1dd66e1034e5ff165f4a95be880ea1fa3a80244c Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Tue, 8 Oct 2024 11:12:54 +0200 Subject: [PATCH 3/3] Do not print code coverage report in text format to STDOUT when --debug or --no-output is used --- src/Runner/CodeCoverage.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Runner/CodeCoverage.php b/src/Runner/CodeCoverage.php index 42f5c696baf..883e4f32ad3 100644 --- a/src/Runner/CodeCoverage.php +++ b/src/Runner/CodeCoverage.php @@ -316,7 +316,9 @@ public function generateReports(Printer $printer, Configuration $configuration): $textReport = $processor->process($this->codeCoverage(), $configuration->colors()); if ($configuration->coverageText() === 'php://stdout') { - $printer->print($textReport); + if (!$configuration->noOutput() && !$configuration->debug()) { + $printer->print($textReport); + } } else { file_put_contents($configuration->coverageText(), $textReport); }