Skip to content

Commit cc88723

Browse files
committed
Fix impossible conditional in test
1 parent dfcfb1b commit cc88723

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

tests/system/Cache/CacheFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ public function testHandlesBadHandler(): void
9696

9797
$this->config->handler = 'dummy';
9898

99-
if (str_starts_with('win', strtolower(php_uname()))) {
100-
$this->assertTrue(true); // can't test properly if we are on Windows
99+
if (is_windows()) {
100+
$this->markTestSkipped('Cannot test this properly on Windows.');
101101
} else {
102102
$this->assertInstanceOf(DummyHandler::class, $this->cacheFactory->getHandler($this->config, 'wincache', 'wincache'));
103103
}

utils/phpstan-baseline/method.alreadyNarrowedType.neon

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 17 errors
1+
# total 16 errors
22

33
parameters:
44
ignoreErrors:
@@ -12,11 +12,6 @@ parameters:
1212
count: 2
1313
path: ../../tests/system/CLI/CLITest.php
1414

15-
-
16-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
17-
count: 1
18-
path: ../../tests/system/Cache/CacheFactoryTest.php
19-
2015
-
2116
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
2217
count: 1

0 commit comments

Comments
 (0)