Skip to content

Commit 7339f2f

Browse files
committed
[TASK] Add more unit tests for Document
Part of #757
1 parent 3a05e1f commit 7339f2f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/Unit/CSSList/DocumentTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
/**
1414
* @covers \Sabberworm\CSS\CSSList\Document
15+
* @covers \Sabberworm\CSS\CSSList\CSSBlockList
16+
* @covers \Sabberworm\CSS\CSSList\CSSList
1517
*/
1618
final class DocumentTest extends TestCase
1719
{
@@ -41,6 +43,14 @@ public function implementsCommentable(): void
4143
self::assertInstanceOf(Commentable::class, $this->subject);
4244
}
4345

46+
/**
47+
* @test
48+
*/
49+
public function getAllDeclarationBlocksInitiallyReturnsEmptyArray(): void
50+
{
51+
self::assertSame([], $this->subject->getAllDeclarationBlocks());
52+
}
53+
4454
/**
4555
* @test
4656
*/
@@ -142,4 +152,12 @@ public function insertContentBeforeAppendsIfSiblingNotFound(): void
142152
self::assertCount(4, $this->subject->getContents());
143153
self::assertSame([$bogusOne, $sibling, $bogusTwo, $item], $this->subject->getContents());
144154
}
155+
156+
/**
157+
* @test
158+
*/
159+
public function isRootListAlwaysReturnsTrue(): void
160+
{
161+
self::assertTrue($this->subject->isRootList());
162+
}
145163
}

0 commit comments

Comments
 (0)