From dbdab6a5997b9cc32aba626df35aae10706a4f5b Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Tue, 18 Feb 2025 10:38:24 +0100 Subject: [PATCH] [TASK] Use more real-life data in a unit test This makes the test easier to read. Also, this prepares for when an `AtRuleBlockList` might not allow an empty type anymore. --- tests/Unit/CSSList/AtRuleBlockListTest.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Unit/CSSList/AtRuleBlockListTest.php b/tests/Unit/CSSList/AtRuleBlockListTest.php index 30a7f305f..782d1e3c5 100644 --- a/tests/Unit/CSSList/AtRuleBlockListTest.php +++ b/tests/Unit/CSSList/AtRuleBlockListTest.php @@ -21,7 +21,7 @@ final class AtRuleBlockListTest extends TestCase */ public function implementsAtRule(): void { - $subject = new AtRuleBlockList(''); + $subject = new AtRuleBlockList('supports'); self::assertInstanceOf(AtRuleBlockList::class, $subject); } @@ -31,7 +31,7 @@ public function implementsAtRule(): void */ public function implementsRenderable(): void { - $subject = new AtRuleBlockList(''); + $subject = new AtRuleBlockList('supports'); self::assertInstanceOf(Renderable::class, $subject); } @@ -41,7 +41,7 @@ public function implementsRenderable(): void */ public function implementsCommentable(): void { - $subject = new AtRuleBlockList(''); + $subject = new AtRuleBlockList('supports'); self::assertInstanceOf(Commentable::class, $subject); } @@ -51,7 +51,7 @@ public function implementsCommentable(): void */ public function atRuleNameReturnsTypeProvidedToConstructor(): void { - $type = 'foo'; + $type = 'keyframes'; $subject = new AtRuleBlockList($type); @@ -63,7 +63,7 @@ public function atRuleNameReturnsTypeProvidedToConstructor(): void */ public function getLineNoByDefaultReturnsZero(): void { - $subject = new AtRuleBlockList(''); + $subject = new AtRuleBlockList('supports'); self::assertSame(0, $subject->getLineNo()); } @@ -73,7 +73,7 @@ public function getLineNoByDefaultReturnsZero(): void */ public function atRuleArgsByDefaultReturnsEmptyString(): void { - $subject = new AtRuleBlockList(''); + $subject = new AtRuleBlockList('supports'); self::assertSame('', $subject->atRuleArgs()); } @@ -107,7 +107,7 @@ public function getLineNoReturnsLineNumberProvidedToConstructor(): void */ public function isRootListAlwaysReturnsFalse(): void { - $subject = new AtRuleBlockList(''); + $subject = new AtRuleBlockList('supports'); self::assertFalse($subject->isRootList()); }