22
33declare (strict_types=1 );
44
5- namespace Sabberworm \CSS \Tests \Unit \Rule ;
5+ namespace Sabberworm \CSS \Tests \Unit \Property ;
66
77use PHPUnit \Framework \TestCase ;
88use Sabberworm \CSS \CSSElement ;
99use Sabberworm \CSS \Parsing \ParserState ;
10- use Sabberworm \CSS \Rule \ Rule ;
10+ use Sabberworm \CSS \Property \ Declaration ;
1111use Sabberworm \CSS \Settings ;
1212use Sabberworm \CSS \Value \RuleValueList ;
1313use Sabberworm \CSS \Value \Value ;
1414use Sabberworm \CSS \Value \ValueList ;
1515
1616/**
17- * @covers \Sabberworm\CSS\Rule\Rule
17+ * @covers \Sabberworm\CSS\Property\Declaration
1818 */
19- final class RuleTest extends TestCase
19+ final class DeclarationTest extends TestCase
2020{
2121 /**
2222 * @test
2323 */
2424 public function implementsCSSElement (): void
2525 {
26- $ subject = new Rule ('beverage-container ' );
26+ $ subject = new Declaration ('beverage-container ' );
2727
2828 self ::assertInstanceOf (CSSElement::class, $ subject );
2929 }
3030
3131 /**
3232 * @return array<string, array{0: string, 1: list<class-string>}>
3333 */
34- public static function provideRulesAndExpectedParsedValueListTypes (): array
34+ public static function provideDeclarationsAndExpectedParsedValueListTypes (): array
3535 {
3636 return [
3737 'src (e.g. in @font-face) ' => [
@@ -49,11 +49,11 @@ public static function provideRulesAndExpectedParsedValueListTypes(): array
4949 *
5050 * @param list<class-string> $expectedTypeClassnames
5151 *
52- * @dataProvider provideRulesAndExpectedParsedValueListTypes
52+ * @dataProvider provideDeclarationsAndExpectedParsedValueListTypes
5353 */
54- public function parsesValuesIntoExpectedTypeList (string $ rule , array $ expectedTypeClassnames ): void
54+ public function parsesValuesIntoExpectedTypeList (string $ declaration , array $ expectedTypeClassnames ): void
5555 {
56- $ subject = Rule ::parse (new ParserState ($ rule , Settings::create ()));
56+ $ subject = Declaration ::parse (new ParserState ($ declaration , Settings::create ()));
5757
5858 $ value = $ subject ->getValue ();
5959 self ::assertInstanceOf (ValueList::class, $ value );
@@ -78,7 +78,7 @@ public function getArrayRepresentationThrowsException(): void
7878 {
7979 $ this ->expectException (\BadMethodCallException::class);
8080
81- $ subject = new Rule ('todo ' );
81+ $ subject = new Declaration ('todo ' );
8282
8383 $ subject ->getArrayRepresentation ();
8484 }
0 commit comments