File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99use Sabberworm \CSS \CSSList \AtRuleBlockList ;
1010use Sabberworm \CSS \CSSList \CSSBlockList ;
1111use Sabberworm \CSS \CSSList \CSSList ;
12+ use Sabberworm \CSS \CSSList \CSSListItem ;
1213use Sabberworm \CSS \Renderable ;
1314
1415/**
@@ -48,6 +49,16 @@ public function implementsCommentable(): void
4849 self ::assertInstanceOf (Commentable::class, $ subject );
4950 }
5051
52+ /**
53+ * @test
54+ */
55+ public function implementsCSSListItem (): void
56+ {
57+ $ subject = new AtRuleBlockList ('supports ' );
58+
59+ self ::assertInstanceOf (CSSListItem::class, $ subject );
60+ }
61+
5162 /**
5263 * @test
5364 */
Original file line number Diff line number Diff line change 66
77use PHPUnit \Framework \TestCase ;
88use Sabberworm \CSS \Comment \Commentable ;
9+ use Sabberworm \CSS \CSSList \CSSListItem ;
910use Sabberworm \CSS \Renderable ;
1011use Sabberworm \CSS \RuleSet \DeclarationBlock ;
1112use Sabberworm \CSS \Tests \Unit \CSSList \Fixtures \ConcreteCSSList ;
@@ -35,6 +36,16 @@ public function implementsCommentable(): void
3536 self ::assertInstanceOf (Commentable::class, $ subject );
3637 }
3738
39+ /**
40+ * @test
41+ */
42+ public function implementsCSSListItem (): void
43+ {
44+ $ subject = new ConcreteCSSList ();
45+
46+ self ::assertInstanceOf (CSSListItem::class, $ subject );
47+ }
48+
3849 /**
3950 * @test
4051 */
Original file line number Diff line number Diff line change 77use PHPUnit \Framework \TestCase ;
88use Sabberworm \CSS \Comment \Commentable ;
99use Sabberworm \CSS \CSSList \CSSList ;
10+ use Sabberworm \CSS \CSSList \CSSListItem ;
1011use Sabberworm \CSS \CSSList \KeyFrame ;
1112use Sabberworm \CSS \Property \AtRule ;
1213use Sabberworm \CSS \Renderable ;
@@ -47,6 +48,16 @@ public function implementsCommentable(): void
4748 self ::assertInstanceOf (Commentable::class, $ subject );
4849 }
4950
51+ /**
52+ * @test
53+ */
54+ public function implementsCSSListItem (): void
55+ {
56+ $ subject = new KeyFrame ();
57+
58+ self ::assertInstanceOf (CSSListItem::class, $ subject );
59+ }
60+
5061 /**
5162 * @test
5263 */
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 \Property ;
6+
7+ use PHPUnit \Framework \TestCase ;
8+ use Sabberworm \CSS \CSSList \CSSListItem ;
9+ use Sabberworm \CSS \Property \CSSNamespace ;
10+ use Sabberworm \CSS \Value \CSSString ;
11+
12+ /**
13+ * @covers \Sabberworm\CSS\Property\CSSNamespace
14+ */
15+ final class CSSNamespaceTest extends TestCase
16+ {
17+ /**
18+ * @var CSSNamespace
19+ */
20+ private $ subject ;
21+
22+ protected function setUp (): void
23+ {
24+ $ this ->subject = new CSSNamespace (new CSSString ('http://www.w3.org/2000/svg ' ));
25+ }
26+
27+ /**
28+ * @test
29+ */
30+ public function implementsCSSListItem (): void
31+ {
32+ self ::assertInstanceOf (CSSListItem::class, $ this ->subject );
33+ }
34+ }
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 \Property ;
6+
7+ use PHPUnit \Framework \TestCase ;
8+ use Sabberworm \CSS \CSSList \CSSListItem ;
9+ use Sabberworm \CSS \Property \Charset ;
10+ use Sabberworm \CSS \Value \CSSString ;
11+
12+ /**
13+ * @covers \Sabberworm\CSS\Property\Charset
14+ */
15+ final class CharsetTest extends TestCase
16+ {
17+ /**
18+ * @var Charset
19+ */
20+ private $ subject ;
21+
22+ protected function setUp (): void
23+ {
24+ $ this ->subject = new Charset (new CSSString ('UTF-8 ' ));
25+ }
26+
27+ /**
28+ * @test
29+ */
30+ public function implementsCSSListItem (): void
31+ {
32+ self ::assertInstanceOf (CSSListItem::class, $ this ->subject );
33+ }
34+ }
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 \Property ;
6+
7+ use PHPUnit \Framework \TestCase ;
8+ use Sabberworm \CSS \CSSList \CSSListItem ;
9+ use Sabberworm \CSS \Property \Import ;
10+ use Sabberworm \CSS \Value \CSSString ;
11+ use Sabberworm \CSS \Value \URL ;
12+
13+ /**
14+ * @covers \Sabberworm\CSS\Property\Import
15+ */
16+ final class ImportTest extends TestCase
17+ {
18+ /**
19+ * @var Import
20+ */
21+ private $ subject ;
22+
23+ protected function setUp (): void
24+ {
25+ $ this ->subject = new Import (new URL (new CSSString ('https://example.org/ ' )), null );
26+ }
27+
28+ /**
29+ * @test
30+ */
31+ public function implementsCSSListItem (): void
32+ {
33+ self ::assertInstanceOf (CSSListItem::class, $ this ->subject );
34+ }
35+ }
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 \RuleSet ;
6+
7+ use PHPUnit \Framework \TestCase ;
8+ use Sabberworm \CSS \CSSList \CSSListItem ;
9+ use Sabberworm \CSS \RuleSet \AtRuleSet ;
10+
11+ /**
12+ * @covers \Sabberworm\CSS\RuleSet\AtRuleSet
13+ */
14+ final class AtRuleSetTest extends TestCase
15+ {
16+ /**
17+ * @var AtRuleSet
18+ */
19+ private $ subject ;
20+
21+ protected function setUp (): void
22+ {
23+ $ this ->subject = new AtRuleSet ('supports ' );
24+ }
25+
26+ /**
27+ * @test
28+ */
29+ public function implementsCSSListItem (): void
30+ {
31+ self ::assertInstanceOf (CSSListItem::class, $ this ->subject );
32+ }
33+ }
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 \RuleSet ;
6+
7+ use PHPUnit \Framework \TestCase ;
8+ use Sabberworm \CSS \CSSList \CSSListItem ;
9+ use Sabberworm \CSS \RuleSet \DeclarationBlock ;
10+
11+ /**
12+ * @covers \Sabberworm\CSS\RuleSet\DeclarationBlock
13+ */
14+ final class DeclarationBlockTest extends TestCase
15+ {
16+ /**
17+ * @var DeclarationBlock
18+ */
19+ private $ subject ;
20+
21+ protected function setUp (): void
22+ {
23+ $ this ->subject = new DeclarationBlock ();
24+ }
25+
26+ /**
27+ * @test
28+ */
29+ public function implementsCSSListItem (): void
30+ {
31+ self ::assertInstanceOf (CSSListItem::class, $ this ->subject );
32+ }
33+ }
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 \RuleSet \Fixtures ;
6+
7+ use Sabberworm \CSS \OutputFormat ;
8+ use Sabberworm \CSS \RuleSet \RuleSet ;
9+
10+ final class ConcreteRuleSet extends RuleSet
11+ {
12+ /**
13+ * @return never
14+ */
15+ public function render (OutputFormat $ outputFormat ): string
16+ {
17+ throw new \BadMethodCallException ('Nothing to see here :/ ' , 1744067015 );
18+ }
19+ }
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 \RuleSet ;
6+
7+ use PHPUnit \Framework \TestCase ;
8+ use Sabberworm \CSS \CSSList \CSSListItem ;
9+ use Sabberworm \CSS \Tests \Unit \RuleSet \Fixtures \ConcreteRuleSet ;
10+
11+ /**
12+ * @covers \Sabberworm\CSS\RuleSet\RuleSet
13+ */
14+ final class RuleSetTest extends TestCase
15+ {
16+ /**
17+ * @var ConcreteRuleSet
18+ */
19+ private $ subject ;
20+
21+ protected function setUp (): void
22+ {
23+ $ this ->subject = new ConcreteRuleSet ();
24+ }
25+
26+ /**
27+ * @test
28+ */
29+ public function implementsCSSListItem (): void
30+ {
31+ self ::assertInstanceOf (CSSListItem::class, $ this ->subject );
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments