From 428ba6f6812fe3988518392aad33bd69cb796e44 Mon Sep 17 00:00:00 2001 From: Jake Hotson Date: Fri, 20 Feb 2026 00:10:18 +0000 Subject: [PATCH] [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. --- tests/Unit/RuleSet/DeclarationBlockTest.php | 2 +- tests/Unit/RuleSet/RuleSetTest.php | 2 +- .../RuleSet/DeclarationListTest.php} | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) rename tests/{Unit/RuleSet/RuleContainerTest.php => unit/RuleSet/DeclarationListTest.php} (99%) diff --git a/tests/Unit/RuleSet/DeclarationBlockTest.php b/tests/Unit/RuleSet/DeclarationBlockTest.php index 6f39ea4b..8c0e4817 100644 --- a/tests/Unit/RuleSet/DeclarationBlockTest.php +++ b/tests/Unit/RuleSet/DeclarationBlockTest.php @@ -23,7 +23,7 @@ */ final class DeclarationBlockTest extends TestCase { - use RuleContainerTest; + use DeclarationListTest; /** * @var DeclarationBlock diff --git a/tests/Unit/RuleSet/RuleSetTest.php b/tests/Unit/RuleSet/RuleSetTest.php index 76cf7b2e..dfd4b4ea 100644 --- a/tests/Unit/RuleSet/RuleSetTest.php +++ b/tests/Unit/RuleSet/RuleSetTest.php @@ -14,7 +14,7 @@ */ final class RuleSetTest extends TestCase { - use RuleContainerTest; + use DeclarationListTest; /** * @var RuleSet diff --git a/tests/Unit/RuleSet/RuleContainerTest.php b/tests/unit/RuleSet/DeclarationListTest.php similarity index 99% rename from tests/Unit/RuleSet/RuleContainerTest.php rename to tests/unit/RuleSet/DeclarationListTest.php index 7bb2964c..737d89e6 100644 --- a/tests/Unit/RuleSet/RuleContainerTest.php +++ b/tests/unit/RuleSet/DeclarationListTest.php @@ -6,24 +6,24 @@ use PHPUnit\Framework\TestCase; use Sabberworm\CSS\Property\Declaration; -use Sabberworm\CSS\RuleSet\RuleContainer; +use Sabberworm\CSS\RuleSet\DeclarationList; use TRegx\PhpUnit\DataProviders\DataProvider; /** - * This trait provides test methods for unit-testing classes that implement `RuleContainer`. + * This trait provides test methods for unit-testing classes that implement `DeclarationList`. * It can be `use`d in a `TestCase` which has a `$subject` property that is an instance of the implementing class * (the class under test), `setUp()` with default values. * * @phpstan-require-extends TestCase */ -trait RuleContainerTest +trait DeclarationListTest { /** * @test */ - public function implementsRuleContainer(): void + public function implementsDeclarationList(): void { - self::assertInstanceOf(RuleContainer::class, $this->subject); + self::assertInstanceOf(DeclarationList::class, $this->subject); } /**