Skip to content

Commit 5d9d3aa

Browse files
Merge branch '8.5' into 9.5
2 parents 5ff8c54 + 4634e70 commit 5d9d3aa

File tree

202 files changed

+218
-208
lines changed

Some content is hidden

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

202 files changed

+218
-208
lines changed

src/Runner/Version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ public static function series(): string
6060

6161
public static function getVersionString(): string
6262
{
63-
return 'PHPUnit ' . self::id() . ' by Sebastian Bergmann and contributors.';
63+
return 'PHPUnit ' . self::id() . ' #StandWithUkraine';
6464
}
6565
}

src/TextUI/TestRunner.php

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
use PHPUnit\TextUI\XmlConfiguration\Configuration;
5555
use PHPUnit\TextUI\XmlConfiguration\Loader;
5656
use PHPUnit\TextUI\XmlConfiguration\PhpHandler;
57+
use PHPUnit\Util\Color;
5758
use PHPUnit\Util\Filesystem;
5859
use PHPUnit\Util\Log\JUnit;
5960
use PHPUnit\Util\Log\TeamCity;
@@ -325,9 +326,18 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [
325326
$this->printer->setShowProgressAnimation(!$arguments['noInteraction']);
326327
}
327328

328-
$this->printer->write(
329-
Version::getVersionString() . "\n"
330-
);
329+
if ($arguments['colors'] !== DefaultResultPrinter::COLOR_NEVER) {
330+
$this->write(
331+
'PHPUnit ' .
332+
Version::id() .
333+
' ' .
334+
Color::colorize('fg-cyan', '#StandWith') .
335+
Color::colorize('fg-yellow', 'Ukraine') .
336+
"\n"
337+
);
338+
} else {
339+
$this->write(Version::getVersionString() . "\n");
340+
}
331341

332342
foreach ($arguments['listeners'] as $listener) {
333343
$result->addListener($listener);
@@ -614,7 +624,7 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [
614624
exit(self::SUCCESS_EXIT);
615625
}
616626

617-
$this->printer->write("\n");
627+
$this->write("\n");
618628

619629
if (isset($codeCoverage)) {
620630
$result->setCodeCoverage($codeCoverage);
@@ -1239,7 +1249,7 @@ private function createPrinter(string $class, array $arguments): ResultPrinter
12391249

12401250
private function codeCoverageGenerationStart(string $format): void
12411251
{
1242-
$this->printer->write(
1252+
$this->write(
12431253
sprintf(
12441254
"\nGenerating code coverage report in %s format ... ",
12451255
$format
@@ -1251,7 +1261,7 @@ private function codeCoverageGenerationStart(string $format): void
12511261

12521262
private function codeCoverageGenerationSucceeded(): void
12531263
{
1254-
$this->printer->write(
1264+
$this->write(
12551265
sprintf(
12561266
"done [%s]\n",
12571267
$this->timer->stop()->asString()
@@ -1261,7 +1271,7 @@ private function codeCoverageGenerationSucceeded(): void
12611271

12621272
private function codeCoverageGenerationFailed(\Exception $e): void
12631273
{
1264-
$this->printer->write(
1274+
$this->write(
12651275
sprintf(
12661276
"failed [%s]\n%s\n",
12671277
$this->timer->stop()->asString(),

tests/end-to-end/assertion.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/AssertionExampleTest.php';
1818
require_once __DIR__ . '/../bootstrap.php';
1919
PHPUnit\TextUI\Command::main();
2020
--EXPECTF--
21-
PHPUnit %s by Sebastian Bergmann and contributors.
21+
PHPUnit %s #StandWithUkraine
2222

2323
F 1 / 1 (100%)
2424

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PHPUnit %s by Sebastian Bergmann and contributors.
1+
PHPUnit %s #StandWithUkraine
22

33
Usage:
44
phpunit [options] UnitTest.php

tests/end-to-end/cli/bootstrap-not-found.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Test fail on missing bootstrap
77
require_once __DIR__ . '/../../bootstrap.php';
88
PHPUnit\TextUI\Command::main();
99
--EXPECTF--
10-
PHPUnit %s by Sebastian Bergmann and contributors.
10+
PHPUnit %s #StandWithUkraine
1111

1212
Cannot open file "nonExistingBootstrap.php".

tests/end-to-end/cli/columns-max.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $_SERVER['argv'][] = __DIR__ . '/../../_files/BankAccountTest.php';
1010
require_once __DIR__ . '/../../bootstrap.php';
1111
PHPUnit\TextUI\Command::main();
1212
--EXPECTF--
13-
PHPUnit %s by Sebastian Bergmann and contributors.
13+
PHPUnit %s #StandWithUkraine
1414

1515
... 3 / 3 (100%)
1616

tests/end-to-end/cli/columns.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $_SERVER['argv'][] = __DIR__ . '/../../_files/BankAccountTest.php';
1010
require_once __DIR__ . '/../../bootstrap.php';
1111
PHPUnit\TextUI\Command::main();
1212
--EXPECTF--
13-
PHPUnit %s by Sebastian Bergmann and contributors.
13+
PHPUnit %s #StandWithUkraine
1414

1515
... 3 / 3 (100%)
1616

tests/end-to-end/cli/generate-configuration.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require_once __DIR__ . '/../../bootstrap.php';
1515
chdir(sys_get_temp_dir());
1616
PHPUnit\TextUI\Command::main();
1717
--EXPECTF--
18-
PHPUnit %s by Sebastian Bergmann and contributors.
18+
PHPUnit %s #StandWithUkraine
1919

2020
Generating phpunit.xml in %s
2121

tests/end-to-end/cli/mycommand.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require_once __DIR__ . '/_files/MyCommand.php';
1414
MyCommand::main();
1515
--EXPECTF--
1616
MyCommand::myHandler 123
17-
PHPUnit %s by Sebastian Bergmann and contributors.
17+
PHPUnit %s #StandWithUkraine
1818

1919
... 3 / 3 (100%)
2020

tests/end-to-end/cli/options-after-arguments.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require_once __DIR__ . '/../../bootstrap.php';
1111

1212
PHPUnit\TextUI\Command::main();
1313
--EXPECTF--
14-
PHPUnit %s by Sebastian Bergmann and contributors.
14+
PHPUnit %s [36m#StandWith[0m[33mUkraine[0m
1515

1616
... 3 / 3 (100%)
1717

0 commit comments

Comments
 (0)