File tree Expand file tree Collapse file tree 4 files changed +91
-0
lines changed Expand file tree Collapse file tree 4 files changed +91
-0
lines changed Original file line number Diff line number Diff line change 77use PHPUnit \Framework \TestCase ;
88use Sabberworm \CSS \Comment \Commentable ;
99use Sabberworm \CSS \CSSList \AtRuleBlockList ;
10+ use Sabberworm \CSS \CSSList \CSSBlockList ;
1011use Sabberworm \CSS \CSSList \CSSList ;
1112use Sabberworm \CSS \Renderable ;
1213
@@ -51,6 +52,16 @@ public function implementsCommentable(): void
5152 self ::assertInstanceOf (Commentable::class, $ subject );
5253 }
5354
55+ /**
56+ * @test
57+ */
58+ public function isCSSBLockList (): void
59+ {
60+ $ subject = new AtRuleBlockList ('supports ' );
61+
62+ self ::assertInstanceOf (CSSBlockList::class, $ subject );
63+ }
64+
5465 /**
5566 * @test
5667 */
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Sabberworm \CSS \Tests \Unit \CSSList ;
6+
7+ use PHPUnit \Framework \TestCase ;
8+ use Sabberworm \CSS \Comment \Commentable ;
9+ use Sabberworm \CSS \CSSList \CSSList ;
10+ use Sabberworm \CSS \Renderable ;
11+ use Sabberworm \CSS \Tests \Unit \CSSList \Fixtures \ConcreteCSSBlockList ;
12+
13+ /**
14+ * @covers \Sabberworm\CSS\CSSList\CSSBlockList
15+ * @covers \Sabberworm\CSS\CSSList\CSSList
16+ */
17+ final class CSSBlockListTest extends TestCase
18+ {
19+ /**
20+ * @test
21+ */
22+ public function implementsRenderable (): void
23+ {
24+ $ subject = new ConcreteCSSBlockList ();
25+
26+ self ::assertInstanceOf (Renderable::class, $ subject );
27+ }
28+
29+ /**
30+ * @test
31+ */
32+ public function implementsCommentable (): void
33+ {
34+ $ subject = new ConcreteCSSBlockList ();
35+
36+ self ::assertInstanceOf (Commentable::class, $ subject );
37+ }
38+
39+ /**
40+ * @test
41+ */
42+ public function isCSSList (): void
43+ {
44+ $ subject = new ConcreteCSSBlockList ();
45+
46+ self ::assertInstanceOf (CSSList::class, $ subject );
47+ }
48+ }
Original file line number Diff line number Diff line change 77use PHPUnit \Framework \TestCase ;
88use Sabberworm \CSS \Comment \Commentable ;
99use Sabberworm \CSS \CSSList \AtRuleBlockList ;
10+ use Sabberworm \CSS \CSSList \CSSBlockList ;
1011use Sabberworm \CSS \CSSList \CSSList ;
1112use Sabberworm \CSS \CSSList \Document ;
1213use Sabberworm \CSS \Property \Charset ;
@@ -43,6 +44,16 @@ public function implementsCommentable(): void
4344 self ::assertInstanceOf (Commentable::class, new Document ());
4445 }
4546
47+ /**
48+ * @test
49+ */
50+ public function isCSSBlockList (): void
51+ {
52+ $ subject = new Document ();
53+
54+ self ::assertInstanceOf (CSSBlockList::class, $ subject );
55+ }
56+
4657 /**
4758 * @test
4859 */
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Sabberworm \CSS \Tests \Unit \CSSList \Fixtures ;
6+
7+ use Sabberworm \CSS \CSSList \CSSBlockList ;
8+ use Sabberworm \CSS \OutputFormat ;
9+
10+ final class ConcreteCSSBlockList extends CSSBlockList
11+ {
12+ public function isRootList (): bool
13+ {
14+ throw new \BadMethodCallException ('Not implemented ' , 1740395831 );
15+ }
16+
17+ public function render (OutputFormat $ outputFormat ): string
18+ {
19+ throw new \BadMethodCallException ('Not implemented ' , 1740395836 );
20+ }
21+ }
You can’t perform that action at this time.
0 commit comments