From 1ee4a9b4d70de17ec9e47a88244f4ea7ab3a3a65 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Fri, 21 Jun 2024 22:04:01 +0200 Subject: [PATCH] [CLEANUP] Ensure all tests actually have an assertion This avoids the "This test did not perform any assertions" warning from PHPUnit. --- tests/RuleSet/LenientParsingTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/RuleSet/LenientParsingTest.php b/tests/RuleSet/LenientParsingTest.php index 6ce5d2ee4..83f670d5c 100644 --- a/tests/RuleSet/LenientParsingTest.php +++ b/tests/RuleSet/LenientParsingTest.php @@ -3,6 +3,7 @@ namespace Sabberworm\CSS\Tests\RuleSet; use PHPUnit\Framework\TestCase; +use Sabberworm\CSS\CSSList\Document; use Sabberworm\CSS\Parser; use Sabberworm\CSS\Parsing\UnexpectedTokenException; use Sabberworm\CSS\Settings; @@ -135,11 +136,13 @@ public function caseInsensitivity(): void /** * @test */ - public function invalidColor(): void + public function cssWithInvalidColorStillGetsParsedAsDocument(): void { $sFile = __DIR__ . '/../fixtures/invalid-color.css'; $oParser = new Parser(file_get_contents($sFile), Settings::create()->withLenientParsing(true)); - $oParser->parse(); + $result = $oParser->parse(); + + self::assertInstanceOf(Document::class, $result); } /**