Skip to content

Commit 08fbcc2

Browse files
Simplify
1 parent 1fec9a5 commit 08fbcc2

File tree

112 files changed

+112
-1008
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+112
-1008
lines changed

tests/end-to-end/cli/fail-on/do-not-fail-on-empty-test-suite-by-default.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,16 @@
22
Test Runner exits with shell exit code indicating success by default when no tests were run
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = tempnam(sys_get_temp_dir(), __FILE__);
6-
75
$_SERVER['argv'][] = '--do-not-cache-result';
86
$_SERVER['argv'][] = '--no-configuration';
9-
$_SERVER['argv'][] = '--no-output';
10-
$_SERVER['argv'][] = '--log-events-text';
11-
$_SERVER['argv'][] = $traceFile;
7+
$_SERVER['argv'][] = '--debug';
128
$_SERVER['argv'][] = '--filter';
139
$_SERVER['argv'][] = 'doesNotExist';
1410
$_SERVER['argv'][] = __DIR__ . '/../../event/_files/SuccessTest.php';
1511

1612
require __DIR__ . '/../../../bootstrap.php';
1713

1814
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
19-
20-
print file_get_contents($traceFile);
21-
22-
unlink($traceFile);
2315
--EXPECTF--
2416
PHPUnit Started (PHPUnit %s using %s)
2517
Test Runner Configured

tests/end-to-end/cli/fail-on/fail-on-deprecation.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,15 @@
22
Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test triggered a deprecation
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = tempnam(sys_get_temp_dir(), __FILE__);
6-
75
$_SERVER['argv'][] = '--do-not-cache-result';
86
$_SERVER['argv'][] = '--no-configuration';
9-
$_SERVER['argv'][] = '--no-output';
10-
$_SERVER['argv'][] = '--log-events-text';
11-
$_SERVER['argv'][] = $traceFile;
7+
$_SERVER['argv'][] = '--debug';
128
$_SERVER['argv'][] = '--fail-on-deprecation';
139
$_SERVER['argv'][] = __DIR__ . '/../../_files/stop-on-fail-on/DeprecationTest.php';
1410

1511
require __DIR__ . '/../../../bootstrap.php';
1612

1713
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
18-
19-
print file_get_contents($traceFile);
20-
21-
unlink($traceFile);
2214
--EXPECTF--
2315
PHPUnit Started (PHPUnit %s using %s)
2416
Test Runner Configured

tests/end-to-end/cli/fail-on/fail-on-empty-test-suite.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
Test Runner exits with shell exit code indicating failure when no tests were run and --fail-on-empty-test-suite option is used
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = tempnam(sys_get_temp_dir(), __FILE__);
6-
75
$_SERVER['argv'][] = '--do-not-cache-result';
86
$_SERVER['argv'][] = '--no-configuration';
9-
$_SERVER['argv'][] = '--no-output';
10-
$_SERVER['argv'][] = '--log-events-text';
11-
$_SERVER['argv'][] = $traceFile;
7+
$_SERVER['argv'][] = '--debug';
128
$_SERVER['argv'][] = '--filter';
139
$_SERVER['argv'][] = 'doesNotExist';
1410
$_SERVER['argv'][] = '--fail-on-empty-test-suite';
@@ -17,10 +13,6 @@ $_SERVER['argv'][] = __DIR__ . '/../../event/_files/SuccessTest.php';
1713
require __DIR__ . '/../../../bootstrap.php';
1814

1915
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
20-
21-
print file_get_contents($traceFile);
22-
23-
unlink($traceFile);
2416
--EXPECTF--
2517
PHPUnit Started (PHPUnit %s using %s)
2618
Test Runner Configured

tests/end-to-end/cli/fail-on/fail-on-incomplete.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,15 @@
22
Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test was marked incomplete
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = tempnam(sys_get_temp_dir(), __FILE__);
6-
75
$_SERVER['argv'][] = '--do-not-cache-result';
86
$_SERVER['argv'][] = '--no-configuration';
9-
$_SERVER['argv'][] = '--no-output';
10-
$_SERVER['argv'][] = '--log-events-text';
11-
$_SERVER['argv'][] = $traceFile;
7+
$_SERVER['argv'][] = '--debug';
128
$_SERVER['argv'][] = '--fail-on-incomplete';
139
$_SERVER['argv'][] = __DIR__ . '/../../_files/stop-on-fail-on/IncompleteTest.php';
1410

1511
require __DIR__ . '/../../../bootstrap.php';
1612

1713
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
18-
19-
print file_get_contents($traceFile);
20-
21-
unlink($traceFile);
2214
--EXPECTF--
2315
PHPUnit Started (PHPUnit %s using %s)
2416
Test Runner Configured

tests/end-to-end/cli/fail-on/fail-on-notice.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,15 @@
22
Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test triggered a notice
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = tempnam(sys_get_temp_dir(), __FILE__);
6-
75
$_SERVER['argv'][] = '--do-not-cache-result';
86
$_SERVER['argv'][] = '--no-configuration';
9-
$_SERVER['argv'][] = '--no-output';
10-
$_SERVER['argv'][] = '--log-events-text';
11-
$_SERVER['argv'][] = $traceFile;
7+
$_SERVER['argv'][] = '--debug';
128
$_SERVER['argv'][] = '--fail-on-notice';
139
$_SERVER['argv'][] = __DIR__ . '/../../_files/stop-on-fail-on/NoticeTest.php';
1410

1511
require __DIR__ . '/../../../bootstrap.php';
1612

1713
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
18-
19-
print file_get_contents($traceFile);
20-
21-
unlink($traceFile);
2214
--EXPECTF--
2315
PHPUnit Started (PHPUnit %s using %s)
2416
Test Runner Configured

tests/end-to-end/cli/fail-on/fail-on-phpunit-deprecation.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,15 @@
22
Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test triggered a PHPUnit deprecation
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = tempnam(sys_get_temp_dir(), __FILE__);
6-
75
$_SERVER['argv'][] = '--do-not-cache-result';
86
$_SERVER['argv'][] = '--no-configuration';
9-
$_SERVER['argv'][] = '--no-output';
10-
$_SERVER['argv'][] = '--log-events-text';
11-
$_SERVER['argv'][] = $traceFile;
7+
$_SERVER['argv'][] = '--debug';
128
$_SERVER['argv'][] = '--fail-on-phpunit-deprecation';
139
$_SERVER['argv'][] = __DIR__ . '/../../_files/stop-on-fail-on/DeprecationTest.php';
1410

1511
require __DIR__ . '/../../../bootstrap.php';
1612

1713
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
18-
19-
print file_get_contents($traceFile);
20-
21-
unlink($traceFile);
2214
--EXPECTF--
2315
PHPUnit Started (PHPUnit %s using %s)
2416
Test Runner Configured

tests/end-to-end/cli/fail-on/fail-on-risky.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,15 @@
22
Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test was considered risky
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = tempnam(sys_get_temp_dir(), __FILE__);
6-
75
$_SERVER['argv'][] = '--do-not-cache-result';
86
$_SERVER['argv'][] = '--no-configuration';
9-
$_SERVER['argv'][] = '--no-output';
10-
$_SERVER['argv'][] = '--log-events-text';
11-
$_SERVER['argv'][] = $traceFile;
7+
$_SERVER['argv'][] = '--debug';
128
$_SERVER['argv'][] = '--fail-on-risky';
139
$_SERVER['argv'][] = __DIR__ . '/../../_files/stop-on-fail-on/RiskyTest.php';
1410

1511
require __DIR__ . '/../../../bootstrap.php';
1612

1713
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
18-
19-
print file_get_contents($traceFile);
20-
21-
unlink($traceFile);
2214
--EXPECTF--
2315
PHPUnit Started (PHPUnit %s using %s)
2416
Test Runner Configured

tests/end-to-end/cli/fail-on/fail-on-skipped.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,15 @@
22
Test Runner exits with shell exit code indicating failure when all tests are successful but at least one test was skipped
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = tempnam(sys_get_temp_dir(), __FILE__);
6-
75
$_SERVER['argv'][] = '--do-not-cache-result';
86
$_SERVER['argv'][] = '--no-configuration';
9-
$_SERVER['argv'][] = '--no-output';
10-
$_SERVER['argv'][] = '--log-events-text';
11-
$_SERVER['argv'][] = $traceFile;
7+
$_SERVER['argv'][] = '--debug';
128
$_SERVER['argv'][] = '--fail-on-skipped';
139
$_SERVER['argv'][] = __DIR__ . '/../../_files/stop-on-fail-on/SkippedTest.php';
1410

1511
require __DIR__ . '/../../../bootstrap.php';
1612

1713
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
18-
19-
print file_get_contents($traceFile);
20-
21-
unlink($traceFile);
2214
--EXPECTF--
2315
PHPUnit Started (PHPUnit %s using %s)
2416
Test Runner Configured

tests/end-to-end/cli/fail-on/fail-on-warning.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,15 @@
22
Test Runner exits with shell exit code indicating failure when all tests are successful but at least one warning was triggered
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = tempnam(sys_get_temp_dir(), __FILE__);
6-
75
$_SERVER['argv'][] = '--do-not-cache-result';
86
$_SERVER['argv'][] = '--no-configuration';
9-
$_SERVER['argv'][] = '--no-output';
10-
$_SERVER['argv'][] = '--log-events-text';
11-
$_SERVER['argv'][] = $traceFile;
7+
$_SERVER['argv'][] = '--debug';
128
$_SERVER['argv'][] = '--fail-on-warning';
139
$_SERVER['argv'][] = __DIR__ . '/../../_files/stop-on-fail-on/WarningTest.php';
1410

1511
require __DIR__ . '/../../../bootstrap.php';
1612

1713
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
18-
19-
print file_get_contents($traceFile);
20-
21-
unlink($traceFile);
2214
--EXPECTF--
2315
PHPUnit Started (PHPUnit %s using %s)
2416
Test Runner Configured

tests/end-to-end/cli/filter/filter-class-match-argument.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,16 @@
22
phpunit --filter FooTest tests/FooTest.php
33
--FILE--
44
<?php declare(strict_types=1);
5-
$traceFile = tempnam(sys_get_temp_dir(), __FILE__);
6-
75
$_SERVER['argv'][] = '--do-not-cache-result';
86
$_SERVER['argv'][] = '--no-configuration';
9-
$_SERVER['argv'][] = '--no-output';
10-
$_SERVER['argv'][] = '--log-events-text';
11-
$_SERVER['argv'][] = $traceFile;
7+
$_SERVER['argv'][] = '--debug';
128
$_SERVER['argv'][] = '--filter';
139
$_SERVER['argv'][] = 'FooTest';
1410
$_SERVER['argv'][] = __DIR__ . '/../../_files/groups/tests/FooTest.php';
1511

1612
require_once __DIR__ . '/../../../bootstrap.php';
1713

1814
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
19-
20-
print file_get_contents($traceFile);
21-
22-
unlink($traceFile);
2315
--EXPECTF--
2416
PHPUnit Started (PHPUnit %s using %s)
2517
Test Runner Configured

0 commit comments

Comments
 (0)