File tree Expand file tree Collapse file tree 10 files changed +254
-0
lines changed Expand file tree Collapse file tree 10 files changed +254
-0
lines changed Original file line number Diff line number Diff line change 9
9
use Sabberworm \CSS \CSSList \AtRuleBlockList ;
10
10
use Sabberworm \CSS \CSSList \CSSBlockList ;
11
11
use Sabberworm \CSS \CSSList \CSSList ;
12
+ use Sabberworm \CSS \CSSList \CSSListItem ;
12
13
use Sabberworm \CSS \Renderable ;
13
14
14
15
/**
@@ -48,6 +49,16 @@ public function implementsCommentable(): void
48
49
self ::assertInstanceOf (Commentable::class, $ subject );
49
50
}
50
51
52
+ /**
53
+ * @test
54
+ */
55
+ public function implementsCSSListItem (): void
56
+ {
57
+ $ subject = new AtRuleBlockList ('supports ' );
58
+
59
+ self ::assertInstanceOf (CSSListItem::class, $ subject );
60
+ }
61
+
51
62
/**
52
63
* @test
53
64
*/
Original file line number Diff line number Diff line change 6
6
7
7
use PHPUnit \Framework \TestCase ;
8
8
use Sabberworm \CSS \Comment \Commentable ;
9
+ use Sabberworm \CSS \CSSList \CSSListItem ;
9
10
use Sabberworm \CSS \Renderable ;
10
11
use Sabberworm \CSS \RuleSet \DeclarationBlock ;
11
12
use Sabberworm \CSS \Tests \Unit \CSSList \Fixtures \ConcreteCSSList ;
@@ -35,6 +36,16 @@ public function implementsCommentable(): void
35
36
self ::assertInstanceOf (Commentable::class, $ subject );
36
37
}
37
38
39
+ /**
40
+ * @test
41
+ */
42
+ public function implementsCSSListItem (): void
43
+ {
44
+ $ subject = new ConcreteCSSList ();
45
+
46
+ self ::assertInstanceOf (CSSListItem::class, $ subject );
47
+ }
48
+
38
49
/**
39
50
* @test
40
51
*/
Original file line number Diff line number Diff line change 7
7
use PHPUnit \Framework \TestCase ;
8
8
use Sabberworm \CSS \Comment \Commentable ;
9
9
use Sabberworm \CSS \CSSList \CSSList ;
10
+ use Sabberworm \CSS \CSSList \CSSListItem ;
10
11
use Sabberworm \CSS \CSSList \KeyFrame ;
11
12
use Sabberworm \CSS \Property \AtRule ;
12
13
use Sabberworm \CSS \Renderable ;
@@ -47,6 +48,16 @@ public function implementsCommentable(): void
47
48
self ::assertInstanceOf (Commentable::class, $ subject );
48
49
}
49
50
51
+ /**
52
+ * @test
53
+ */
54
+ public function implementsCSSListItem (): void
55
+ {
56
+ $ subject = new KeyFrame ();
57
+
58
+ self ::assertInstanceOf (CSSListItem::class, $ subject );
59
+ }
60
+
50
61
/**
51
62
* @test
52
63
*/
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