File tree Expand file tree Collapse file tree 4 files changed +90
-0
lines changed Expand file tree Collapse file tree 4 files changed +90
-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 \Renderable ;
10+ use Sabberworm \CSS \Tests \Unit \CSSList \Fixtures \ConcreteCSSBlockList ;
11+
12+ /**
13+ * @covers \Sabberworm\CSS\CSSList\CSSBlockList
14+ * @covers \Sabberworm\CSS\CSSList\CSSList
15+ */
16+ final class CSSBlockListTest extends TestCase
17+ {
18+ /**
19+ * @test
20+ */
21+ public function implementsRenderable (): void
22+ {
23+ $ subject = new ConcreteCSSBlockList ();
24+
25+ self ::assertInstanceOf (Renderable::class, $ subject );
26+ }
27+
28+ /**
29+ * @test
30+ */
31+ public function implementsCommentable (): void
32+ {
33+ $ subject = new ConcreteCSSBlockList ();
34+
35+ self ::assertInstanceOf (Commentable::class, $ subject );
36+ }
37+
38+ /**
39+ * @test
40+ */
41+ public function isCSSList (): void
42+ {
43+ $ subject = new ConcreteCSSBlockList ();
44+
45+ self ::assertInstanceOf (ConcreteCSSBlockList::class, $ subject );
46+ }
47+ }
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