Skip to content

Commit eb21e52

Browse files
Merge branch '11.4' into 11.5
2 parents 5de126d + 360f0f0 commit eb21e52

File tree

154 files changed

+222
-1201
lines changed

Some content is hidden

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

154 files changed

+222
-1201
lines changed

composer.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,27 @@
7171
},
7272
"autoload-dev": {
7373
"classmap": [
74-
"tests/"
74+
"tests/_files"
7575
],
7676
"files": [
7777
"tests/_files/deprecation-trigger/trigger_deprecation.php",
78+
"tests/unit/Event/AbstractEventTestCase.php",
79+
"tests/unit/Framework/MockObject/TestDoubleTestCase.php",
80+
"tests/unit/Metadata/Parser/AnnotationParserTestCase.php",
81+
"tests/unit/Metadata/Parser/AttributeParserTestCase.php",
82+
"tests/unit/Framework/Assert/assertDirectoryExistsTest.php",
83+
"tests/unit/Framework/Assert/assertFileExistsTest.php",
84+
"tests/unit/Framework/Assert/assertIsNumericTest.php",
85+
"tests/unit/Framework/Assert/assertIsObjectTest.php",
86+
"tests/unit/Framework/Assert/assertIsReadableTest.php",
87+
"tests/unit/Framework/Assert/assertIsResourceTest.php",
88+
"tests/unit/Framework/Assert/assertIsScalarTest.php",
89+
"tests/unit/Framework/Assert/assertIsStringTest.php",
90+
"tests/unit/Framework/Assert/assertIsWritableTest.php",
91+
"tests/unit/Framework/Assert/assertMatchesRegularExpressionTest.php",
92+
"tests/unit/Framework/Assert/assertNullTest.php",
93+
"tests/unit/Framework/Assert/assertSameSizeTest.php",
94+
"tests/unit/Framework/Assert/assertSameTest.php",
7895
"tests/_files/CoverageNamespacedFunctionTest.php",
7996
"tests/_files/CoveredFunction.php",
8097
"tests/_files/Generator.php",

src/Runner/CodeCoverage.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ public function generateReports(Printer $printer, Configuration $configuration):
316316
$textReport = $processor->process($this->codeCoverage(), $configuration->colors());
317317

318318
if ($configuration->coverageText() === 'php://stdout') {
319-
$printer->print($textReport);
319+
if (!$configuration->noOutput() && !$configuration->debug()) {
320+
$printer->print($textReport);
321+
}
320322
} else {
321323
file_put_contents($configuration->coverageText(), $textReport);
322324
}

tests/end-to-end/cli/exclude-filter/match.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,16 @@
22
phpunit --exclude-filter testThree ../../_files/groups/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'][] = '--exclude-filter';
139
$_SERVER['argv'][] = 'testThree';
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

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

0 commit comments

Comments
 (0)