Skip to content

Commit

Permalink
Merge branch '8.5' into 9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 5, 2022
2 parents 5ff8c54 + 4634e70 commit 5d9d3aa
Show file tree
Hide file tree
Showing 202 changed files with 218 additions and 208 deletions.
2 changes: 1 addition & 1 deletion src/Runner/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ public static function series(): string

public static function getVersionString(): string
{
return 'PHPUnit ' . self::id() . ' by Sebastian Bergmann and contributors.';
return 'PHPUnit ' . self::id() . ' #StandWithUkraine';
}
}
24 changes: 17 additions & 7 deletions src/TextUI/TestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
use PHPUnit\TextUI\XmlConfiguration\Configuration;
use PHPUnit\TextUI\XmlConfiguration\Loader;
use PHPUnit\TextUI\XmlConfiguration\PhpHandler;
use PHPUnit\Util\Color;
use PHPUnit\Util\Filesystem;
use PHPUnit\Util\Log\JUnit;
use PHPUnit\Util\Log\TeamCity;
Expand Down Expand Up @@ -325,9 +326,18 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [
$this->printer->setShowProgressAnimation(!$arguments['noInteraction']);
}

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

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

$this->printer->write("\n");
$this->write("\n");

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

private function codeCoverageGenerationStart(string $format): void
{
$this->printer->write(
$this->write(
sprintf(
"\nGenerating code coverage report in %s format ... ",
$format
Expand All @@ -1251,7 +1261,7 @@ private function codeCoverageGenerationStart(string $format): void

private function codeCoverageGenerationSucceeded(): void
{
$this->printer->write(
$this->write(
sprintf(
"done [%s]\n",
$this->timer->stop()->asString()
Expand All @@ -1261,7 +1271,7 @@ private function codeCoverageGenerationSucceeded(): void

private function codeCoverageGenerationFailed(\Exception $e): void
{
$this->printer->write(
$this->write(
sprintf(
"failed [%s]\n%s\n",
$this->timer->stop()->asString(),
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.php
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/cli/bootstrap-not-found.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Test fail on missing bootstrap
require_once __DIR__ . '/../../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Cannot open file "nonExistingBootstrap.php".
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/generate-configuration.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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/cli/test-file-not-found.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Test incorrect testFile is reported
require_once __DIR__ . '/../../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
PHPUnit %s #StandWithUkraine

Cannot open file "nonExistingFile.php".
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require_once __DIR__ . '/../../bootstrap.php';

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

Test 'PHPUnit\TestFixture\AnnotationFilterTest::testOne' started
Test 'PHPUnit\TestFixture\AnnotationFilterTest::testOne' ended
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require_once __DIR__ . '/../../bootstrap.php';

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

Test 'PHPUnit\TestFixture\AnnotationFilterTest::testTwo' started
Test 'PHPUnit\TestFixture\AnnotationFilterTest::testTwo' ended
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


Warning: Test case class not matching filename is deprecated
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 (PHPUnit\TestFixture\DummyFoo)
✔ 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 (PHPUnit\TestFixture\DummyBar)
✔ 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

Please note that --dump-xdebug-filter and --prepend are deprecated and will be removed in PHPUnit 10.
<?php declare(strict_types=1);
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 @@ -18,7 +18,7 @@ PHPUnit\TextUI\Command::main(false);

print file_get_contents($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 @@ -18,7 +18,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
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
2 changes: 1 addition & 1 deletion tests/end-to-end/execution-order/depends-on-class.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
Configuration: %s%etests%e_files%econfiguration.depends-on-class.xml
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
Loading

0 comments on commit 5d9d3aa

Please sign in to comment.