Skip to content

Commit 4ccb49f

Browse files
committed
[TASK] Add more unit tests for Document
Part of #757
1 parent d7d9128 commit 4ccb49f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/Unit/CSSList/DocumentTest.php

Lines changed: 22 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
{
@@ -31,6 +33,16 @@ public function implementsCommentable(): void
3133
self::assertInstanceOf(Commentable::class, new Document());
3234
}
3335

36+
/**
37+
* @test
38+
*/
39+
public function getAllDeclarationBlocksInitiallyReturnsEmptyArray(): void
40+
{
41+
$subject = new Document();
42+
43+
self::assertSame([], $subject->getAllDeclarationBlocks());
44+
}
45+
3446
/**
3547
* @test
3648
*/
@@ -142,4 +154,14 @@ public function insertContentBeforeAppendsIfSiblingNotFound(): void
142154
self::assertCount(4, $subject->getContents());
143155
self::assertSame([$bogusOne, $sibling, $bogusTwo, $item], $subject->getContents());
144156
}
157+
158+
/**
159+
* @test
160+
*/
161+
public function isRootListAlwaysReturnsTrue(): void
162+
{
163+
$subject = new Document();
164+
165+
self::assertTrue($subject->isRootList());
166+
}
145167
}

0 commit comments

Comments
 (0)