Skip to content

Commit a9e7b09

Browse files
authored
[CLEANUP] Remove redundant test code (#1584)
`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.
1 parent bdb95ea commit a9e7b09

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

tests/ParserTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ public function colorParsing(): void
151151
self::assertEmpty($colorDeclarations);
152152
}
153153
}
154-
foreach ($document->getAllValues(null, 'color') as $colorValue) {
155-
self::assertSame('red', $colorValue);
156-
}
157154
self::assertSame(
158155
'#mine {color: red;border-color: #0a64e6;border-color: rgba(10,100,231,.3);outline-color: #222;'
159156
. "background-color: #232323;}\n"

0 commit comments

Comments
 (0)