File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,4 +65,18 @@ public function render(OutputFormat $outputFormat): string
6565 $ result .= '} ' ;
6666 return $ result ;
6767 }
68+
69+ /**
70+ * @return array<string, bool|int|float|string|array<mixed>|null>
71+ *
72+ * @internal
73+ */
74+ public function getArrayRepresentation (): array
75+ {
76+ $ arrayRepresentation = parent ::getArrayRepresentation ();
77+ $ arrayRepresentation ['atRuleName ' ] = $ this ->type ;
78+ $ arrayRepresentation ['arguments ' ] = $ this ->arguments ;
79+
80+ return $ arrayRepresentation ;
81+ }
6882}
Original file line number Diff line number Diff line change @@ -77,4 +77,30 @@ public function getArrayRepresentationIncludesDeclarations(): void
7777 $ result ['declarations ' ]
7878 );
7979 }
80+
81+ /**
82+ * @test
83+ */
84+ public function getArrayRepresentationIncludesAtRuleName (): void
85+ {
86+ $ atRuleName = 'supports ' ;
87+ $ subject = new AtRuleSet ($ atRuleName );
88+
89+ $ result = $ subject ->getArrayRepresentation ();
90+
91+ self ::assertSame ($ atRuleName , $ result ['atRuleName ' ]);
92+ }
93+
94+ /**
95+ * @test
96+ */
97+ public function getArrayRepresentationIncludesArguments (): void
98+ {
99+ $ arguments = 'foo ' ;
100+ $ subject = new AtRuleSet ('supports ' , $ arguments );
101+
102+ $ result = $ subject ->getArrayRepresentation ();
103+
104+ self ::assertSame ($ arguments , $ result ['arguments ' ]);
105+ }
80106}
You can’t perform that action at this time.
0 commit comments