From 3ec98837f3336d13de19c560398fbbae25442e6b Mon Sep 17 00:00:00 2001 From: Jake Hotson Date: Wed, 13 May 2026 23:51:16 +0100 Subject: [PATCH] [CLEANUP] Remove redundant test code `getAllValues()` only includes values that are `Value` objects. It does not include `string` values. So the list returned was empty, the loop had no iterations, and the `assertSame()` was never called. It doesn't make sense to replace the code with an assertion that `getAllValues()` is returning an empty list, because the `TestCase` is for `Parser`, not `Document`. Besides, there is already an assertion that `red` is set for the string `color` value. Uncovered by PHPStan config change in #1583. This change would also have silenced the same PHPStan warning. --- tests/ParserTest.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/ParserTest.php b/tests/ParserTest.php index 0c708867..6680bc0f 100644 --- a/tests/ParserTest.php +++ b/tests/ParserTest.php @@ -151,9 +151,6 @@ public function colorParsing(): void self::assertEmpty($colorDeclarations); } } - foreach ($document->getAllValues(null, 'color') as $colorValue) { - self::assertSame('red', $colorValue); - } self::assertSame( '#mine {color: red;border-color: #0a64e6;border-color: rgba(10,100,231,.3);outline-color: #222;' . "background-color: #232323;}\n"