Skip to content

Commit 6388ae1

Browse files
authored
[CLEANUP] Ensure all tests actually have an assertion (#609)
This avoids the "This test did not perform any assertions" warning from PHPUnit.
1 parent 5a4245f commit 6388ae1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/RuleSet/LenientParsingTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Sabberworm\CSS\Tests\RuleSet;
44

55
use PHPUnit\Framework\TestCase;
6+
use Sabberworm\CSS\CSSList\Document;
67
use Sabberworm\CSS\Parser;
78
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
89
use Sabberworm\CSS\Settings;
@@ -135,11 +136,13 @@ public function caseInsensitivity(): void
135136
/**
136137
* @test
137138
*/
138-
public function invalidColor(): void
139+
public function cssWithInvalidColorStillGetsParsedAsDocument(): void
139140
{
140141
$sFile = __DIR__ . '/../fixtures/invalid-color.css';
141142
$oParser = new Parser(file_get_contents($sFile), Settings::create()->withLenientParsing(true));
142-
$oParser->parse();
143+
$result = $oParser->parse();
144+
145+
self::assertInstanceOf(Document::class, $result);
143146
}
144147

145148
/**

0 commit comments

Comments
 (0)