Skip to content

Commit e89a90c

Browse files
authored
[TASK] Reduce and finetune the scope of @covers annotations (#1188)
The legacy tests are not very focused. Until we have split them up, try to avoid false positives for code coverage. Also add `@covers` annotations for the parent classes of the tested classes.
1 parent ff1af18 commit e89a90c

File tree

6 files changed

+6
-24
lines changed

6 files changed

+6
-24
lines changed

tests/CSSList/AtRuleBlockListTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
/**
1212
* @covers \Sabberworm\CSS\CSSList\AtRuleBlockList
13+
* @covers \Sabberworm\CSS\CSSList\CSSBlockList
14+
* @covers \Sabberworm\CSS\CSSList\CSSList
1315
*/
1416
final class AtRuleBlockListTest extends TestCase
1517
{

tests/Comment/CommentTest.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
use Sabberworm\CSS\Tests\ParserTest as TestsParserTest;
1010

1111
/**
12-
* @covers \Sabberworm\CSS\Comment\Comment
13-
* @covers \Sabberworm\CSS\OutputFormat
14-
* @covers \Sabberworm\CSS\OutputFormatter
12+
* @coversNothing
1513
*/
1614
final class CommentTest extends TestCase
1715
{

tests/OutputFormatTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Sabberworm\CSS\Parsing\OutputException;
1212

1313
/**
14-
* @covers \Sabberworm\CSS\OutputFormat
14+
* @coversNothing
1515
*/
1616
final class OutputFormatTest extends TestCase
1717
{

tests/ParserTest.php

-10
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,7 @@
2828
use Sabberworm\CSS\Value\ValueList;
2929

3030
/**
31-
* @covers \Sabberworm\CSS\CSSList\Document
3231
* @covers \Sabberworm\CSS\Parser
33-
* @covers \Sabberworm\CSS\RuleSet\DeclarationBlock
34-
* @covers \Sabberworm\CSS\Rule\Rule
35-
* @covers \Sabberworm\CSS\Value\CSSString
36-
* @covers \Sabberworm\CSS\Value\CalcFunction
37-
* @covers \Sabberworm\CSS\Value\Color
38-
* @covers \Sabberworm\CSS\Value\LineName
39-
* @covers \Sabberworm\CSS\Value\Size
40-
* @covers \Sabberworm\CSS\Value\URL
41-
* @covers \Sabberworm\CSS\Value\Value
4232
*/
4333
final class ParserTest extends TestCase
4434
{

tests/RuleSet/DeclarationBlockTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
/**
1515
* @covers \Sabberworm\CSS\RuleSet\DeclarationBlock
16+
* @covers \Sabberworm\CSS\RuleSet\RuleSet
1617
*/
1718
final class DeclarationBlockTest extends TestCase
1819
{

tests/RuleSet/LenientParsingTest.php

+1-10
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,7 @@
1111
use Sabberworm\CSS\Settings;
1212

1313
/**
14-
* @covers \Sabberworm\CSS\CSSList\Document
15-
* @covers \Sabberworm\CSS\Parser
16-
* @covers \Sabberworm\CSS\RuleSet\DeclarationBlock
17-
* @covers \Sabberworm\CSS\Rule\Rule
18-
* @covers \Sabberworm\CSS\Value\CSSString
19-
* @covers \Sabberworm\CSS\Value\CalcFunction
20-
* @covers \Sabberworm\CSS\Value\Color
21-
* @covers \Sabberworm\CSS\Value\LineName
22-
* @covers \Sabberworm\CSS\Value\Size
23-
* @covers \Sabberworm\CSS\Value\URL
14+
* @coversNothing
2415
*/
2516
final class LenientParsingTest extends TestCase
2617
{

0 commit comments

Comments
 (0)