diff --git a/tests/Unit/CSSList/AtRuleBlockListTest.php b/tests/Unit/CSSList/AtRuleBlockListTest.php index b57e0525..30a7f305 100644 --- a/tests/Unit/CSSList/AtRuleBlockListTest.php +++ b/tests/Unit/CSSList/AtRuleBlockListTest.php @@ -11,6 +11,8 @@ /** * @covers \Sabberworm\CSS\CSSList\AtRuleBlockList + * @covers \Sabberworm\CSS\CSSList\CSSBlockList + * @covers \Sabberworm\CSS\CSSList\CSSList */ final class AtRuleBlockListTest extends TestCase { @@ -43,4 +45,70 @@ public function implementsCommentable(): void self::assertInstanceOf(Commentable::class, $subject); } + + /** + * @test + */ + public function atRuleNameReturnsTypeProvidedToConstructor(): void + { + $type = 'foo'; + + $subject = new AtRuleBlockList($type); + + self::assertSame($type, $subject->atRuleName()); + } + + /** + * @test + */ + public function getLineNoByDefaultReturnsZero(): void + { + $subject = new AtRuleBlockList(''); + + self::assertSame(0, $subject->getLineNo()); + } + + /** + * @test + */ + public function atRuleArgsByDefaultReturnsEmptyString(): void + { + $subject = new AtRuleBlockList(''); + + self::assertSame('', $subject->atRuleArgs()); + } + + /** + * @test + */ + public function atRuleArgsReturnsArgumentsProvidedToConstructor(): void + { + $arguments = 'bar'; + + $subject = new AtRuleBlockList('', $arguments); + + self::assertSame($arguments, $subject->atRuleArgs()); + } + + /** + * @test + */ + public function getLineNoReturnsLineNumberProvidedToConstructor(): void + { + $lineNumber = 42; + + $subject = new AtRuleBlockList('', '', $lineNumber); + + self::assertSame($lineNumber, $subject->getLineNo()); + } + + /** + * @test + */ + public function isRootListAlwaysReturnsFalse(): void + { + $subject = new AtRuleBlockList(''); + + self::assertFalse($subject->isRootList()); + } }