Skip to content

Commit

Permalink
#StandWithUkraine
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 5, 2022
1 parent 83e5a9a commit 4634e70
Show file tree
Hide file tree
Showing 180 changed files with 192 additions and 180 deletions.
2 changes: 1 addition & 1 deletion src/Runner/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static function series(): string

public static function getVersionString(): string
{
return 'PHPUnit ' . self::id() . ' by Sebastian Bergmann and contributors.';
return 'PHPUnit ' . self::id() . ' #StandWithUkraine';
}

public static function getReleaseChannel(): string
Expand Down
14 changes: 13 additions & 1 deletion src/TextUI/TestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
use PHPUnit\Runner\TestSuiteLoader;
use PHPUnit\Runner\TestSuiteSorter;
use PHPUnit\Runner\Version;
use PHPUnit\Util\Color;
use PHPUnit\Util\Configuration;
use PHPUnit\Util\Filesystem;
use PHPUnit\Util\Log\JUnit;
Expand Down Expand Up @@ -318,7 +319,18 @@ public function doRun(Test $suite, array $arguments = [], array $warnings = [],
$this->printer->setShowProgressAnimation(!$arguments['noInteraction']);
}

$this->write(Version::getVersionString() . "\n");
if ($arguments['colors'] !== ResultPrinter::COLOR_NEVER) {
$this->write(
'PHPUnit ' .
Version::id() .
' ' .
Color::colorize('fg-cyan', '#StandWith') .
Color::colorize('fg-yellow', 'Ukraine') .
"\n"
);
} else {
$this->write(Version::getVersionString() . "\n");
}

if ($arguments['verbose']) {
$this->writeMessage('Runtime', $this->runtime->getNameWithVersionAndCodeCoverageDriver());
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/abstract-test-class.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/AbstractTest.php';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Warning: Invocation with class name is deprecated

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/assertion.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/AssertionExampleTest.php';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

F 1 / 1 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/cli/_files/output-cli-usage.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Usage:
phpunit [options] UnitTest [UnitTest.php]
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/cli/columns-max.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $_SERVER['argv'][] = __DIR__ . '/../../_files/BankAccountTest.php';
require_once __DIR__ . '/../../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

... 3 / 3 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/cli/columns.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $_SERVER['argv'][] = __DIR__ . '/../../_files/BankAccountTest.php';
require_once __DIR__ . '/../../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

... 3 / 3 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/cli/deprecation-warning-with-class.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $_SERVER['argv'][3] = __DIR__ . '/../../_files/DummyFooTest.php';
require_once __DIR__ . '/../../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Warning: Invocation with class name is deprecated

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/cli/generate-configuration.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require_once __DIR__ . '/../../bootstrap.php';
chdir(sys_get_temp_dir());
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Generating phpunit.xml in %s

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/cli/mycommand.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require_once __DIR__ . '/_files/MyCommand.php';
MyCommand::main();
--EXPECTF--
MyCommand::myHandler 123
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

... 3 / 3 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/cli/options-after-arguments.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require_once __DIR__ . '/../../bootstrap.php';

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

... 3 / 3 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/concrete-test-class.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/ConcreteTest.php';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

.. 2 / 2 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/dataprovider-issue-2833.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/DataProviderIssue2833/';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

.. 2 / 2 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/dataprovider-issue-2859.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/DataProviderIssue2859/phpunit.xml';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

. 1 / 1 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/dataprovider-issue-2922.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/DataProviderIssue2922/';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

. 1 / 1 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/dataprovider-log-xml-isolation.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/DataProviderTest.php';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

..F. 4 / 4 (100%)<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/dataprovider-log-xml.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/DataProviderTest.php';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

..F. 4 / 4 (100%)<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/default-isolation.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/BankAccountTest.php';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

... 3 / 3 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/default.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/BankAccountTest.php';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

... 3 / 3 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/defaulttestsuite-using-testsuite.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $_SERVER['argv'][] = 'First';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Dummy Foo
✔ Foo equals foo
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/defaulttestsuite.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $_SERVER['argv'][] = __DIR__.'/../_files/configuration.defaulttestsuite.xml';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Dummy Bar
✔ Bar equals bar
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/dump-xdebug-filter.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $_SERVER['argv'][] = 'php://stderr';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

<?php declare(strict_types=1);
if (!\function_exists('xdebug_set_filter')) {
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/empty-testcase.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/EmptyTestCaseTest.php';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

W 1 / 1 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/exception-stack.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/ExceptionStackTest.php';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

EE 2 / 2 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/exclude-group-isolation.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/BankAccountTest.php';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

.. 2 / 2 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/exclude-group.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $_SERVER['argv'][] = __DIR__ . '/../_files/BankAccountTest.php';
require_once __DIR__ . '/../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

.. 2 / 2 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/execution-order/cache-result.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ print file_get_contents($target);

unlink($target);
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

.SS.. 5 / 5 (100%)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PHPUnit\TextUI\Command::main();

\unlink($tmpResultCache);
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Test 'MultiDependencyTest::testFive' started
Test 'MultiDependencyTest::testFive' ended
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/execution-order/dependencies-clone.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Runtime: %s

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Runtime: %s

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

.. 2 / 2 (100%)

Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/execution-order/depends-as-parameter.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

.. 2 / 2 (100%)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

..... 5 / 5 (100%)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

..... 5 / 5 (100%)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Test 'MultiDependencyTest::testFive' started
Test 'MultiDependencyTest::testFive' ended
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

unrecognized --order-by option: foobar
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PHPUnit\TextUI\Command::main();

unlink($tmpResultCache);
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Test 'TestWithDifferentDurations::testTwo' started
Test 'TestWithDifferentDurations::testTwo' ended
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PHPUnit\TextUI\Command::main();

unlink($tmpResultCache);
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Test 'TestWithDifferentDurations::testTwo' started
Test 'TestWithDifferentDurations::testTwo' ended
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/execution-order/repeat.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

......... 9 / 9 (100%)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

W

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

W

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

IE

Expand Down
Loading

1 comment on commit 4634e70

@phpfui
Copy link

@phpfui phpfui commented on 4634e70 Mar 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Please sign in to comment.