Skip to content

Commit 54cc2e4

Browse files
Merge branch '11.4' into 11.5
2 parents 9e1a5d8 + c15a1d4 commit 54cc2e4

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/TextUI/Command/Commands/VersionCheckCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public function execute(): Result
4141

4242
$latestCompatibleVersion = $this->downloader->download('https://phar.phpunit.de/latest-version-of/phpunit-' . $this->majorVersionNumber);
4343

44+
assert($latestCompatibleVersion !== false);
45+
4446
$notLatest = version_compare($latestVersion, $this->versionId, '>');
4547
$notLatestCompatible = false;
4648

tests/unit/TextUI/Command/Commands/VersionCheckCommandTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
namespace PHPUnit\TextUI\Command;
1111

12-
use function trim;
12+
use const PHP_EOL;
1313
use PHPUnit\Framework\Attributes\CoversClass;
1414
use PHPUnit\Framework\Attributes\DataProvider;
1515
use PHPUnit\Framework\Attributes\Small;
@@ -28,27 +28,27 @@ public static function provider(): array
2828
{
2929
return [
3030
[
31-
'You are using the latest version of PHPUnit.',
31+
'You are using the latest version of PHPUnit.' . PHP_EOL,
3232
Result::SUCCESS,
3333
10,
3434
'10.5.0',
3535
'10.5.0',
3636
'10.5.0',
3737
],
3838
[
39-
'You are not using the latest version of PHPUnit.
40-
The latest version compatible with PHPUnit 10.5.0 is PHPUnit 10.5.1.
41-
The latest version is PHPUnit 10.5.1.',
39+
'You are not using the latest version of PHPUnit.' . PHP_EOL .
40+
'The latest version compatible with PHPUnit 10.5.0 is PHPUnit 10.5.1.' . PHP_EOL .
41+
'The latest version is PHPUnit 10.5.1.' . PHP_EOL,
4242
Result::FAILURE,
4343
10,
4444
'10.5.0',
4545
'10.5.1',
4646
'10.5.1',
4747
],
4848
[
49-
'You are not using the latest version of PHPUnit.
50-
The latest version compatible with PHPUnit 10.5.0 is PHPUnit 10.5.1.
51-
The latest version is PHPUnit 11.0.0.',
49+
'You are not using the latest version of PHPUnit.' . PHP_EOL .
50+
'The latest version compatible with PHPUnit 10.5.0 is PHPUnit 10.5.1.' . PHP_EOL .
51+
'The latest version is PHPUnit 11.0.0.' . PHP_EOL,
5252
Result::FAILURE,
5353
10,
5454
'10.5.0',
@@ -77,7 +77,7 @@ public function testChecksVersion(string $expectedMessage, int $expectedShellExi
7777

7878
$result = $command->execute();
7979

80-
$this->assertSame($expectedMessage, trim($result->output()));
80+
$this->assertSame($expectedMessage, $result->output());
8181
$this->assertSame($expectedShellExitCode, $result->shellExitCode());
8282
}
8383

0 commit comments

Comments
 (0)