Skip to content

Commit b0b9345

Browse files
committed
[TASK] Use DeclarationList in the tests
The interface was renamed from `RuleContainer` in #1530. Also accordingly rename the trait that provides test methods for implementing classes.
1 parent 69f4ed8 commit b0b9345

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/RuleSet/DeclarationBlock.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
*
3333
* Note that `CSSListItem` extends both `Commentable` and `Renderable`, so those interfaces must also be implemented.
3434
*/
35-
class DeclarationBlock implements CSSElement, CSSListItem, Positionable, RuleContainer
35+
class DeclarationBlock implements CSSElement, CSSListItem, Positionable, DeclarationList
3636
{
3737
use CommentContainer;
38-
use LegacyRuleContainerMethods;
38+
use LegacyDeclarationListMethods;
3939
use Position;
4040

4141
/**

src/RuleSet/RuleSet.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
*
2727
* Note that `CSSListItem` extends both `Commentable` and `Renderable`, so those interfaces must also be implemented.
2828
*/
29-
class RuleSet implements CSSElement, CSSListItem, Positionable, RuleContainer
29+
class RuleSet implements CSSElement, CSSListItem, Positionable, DeclarationList
3030
{
3131
use CommentContainer;
32-
use LegacyRuleContainerMethods;
32+
use LegacyDeclarationListMethods;
3333
use Position;
3434

3535
/**

tests/Unit/RuleSet/DeclarationBlockTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
final class DeclarationBlockTest extends TestCase
2525
{
26-
use RuleContainerTest;
26+
use DeclarationListTest;
2727

2828
/**
2929
* @var DeclarationBlock

tests/Unit/RuleSet/RuleSetTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
final class RuleSetTest extends TestCase
1616
{
17-
use RuleContainerTest;
17+
use DeclarationListTest;
1818

1919
/**
2020
* @var RuleSet

tests/Unit/RuleSet/RuleContainerTest.php renamed to tests/unit/RuleSet/DeclarationListTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66

77
use PHPUnit\Framework\TestCase;
88
use Sabberworm\CSS\Property\Declaration;
9-
use Sabberworm\CSS\RuleSet\RuleContainer;
9+
use Sabberworm\CSS\RuleSet\DeclarationList;
1010
use TRegx\PhpUnit\DataProviders\DataProvider;
1111

1212
/**
13-
* This trait provides test methods for unit-testing classes that implement `RuleContainer`.
13+
* This trait provides test methods for unit-testing classes that implement `DeclarationList`.
1414
* It can be `use`d in a `TestCase` which has a `$subject` property that is an instance of the implementing class
1515
* (the class under test), `setUp()` with default values.
1616
*
1717
* @phpstan-require-extends TestCase
1818
*/
19-
trait RuleContainerTest
19+
trait DeclarationListTest
2020
{
2121
/**
2222
* @test
2323
*/
24-
public function implementsRuleContainer(): void
24+
public function implementsDeclarationList(): void
2525
{
26-
self::assertInstanceOf(RuleContainer::class, $this->subject);
26+
self::assertInstanceOf(DeclarationList::class, $this->subject);
2727
}
2828

2929
/**

0 commit comments

Comments
 (0)