Skip to content

Commit 99217b8

Browse files
authored
[TASK] Use getArrayRepresentation() in ValueTest (#1441)
... in `parsesArithmeticInFunctions()` test. Follows on from #1440.
1 parent 1b5be34 commit 99217b8

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

tests/Unit/Value/ValueTest.php

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,42 @@ public function parsesArithmeticInFunctions(string $operator): void
6060
self::DEFAULT_DELIMITERS
6161
);
6262

63-
self::assertInstanceOf(CSSFunction::class, $subject);
64-
self::assertSame('max(300px,50vh ' . $operator . ' 10px)', $subject->render(OutputFormat::createCompact()));
63+
$result = $subject->getArrayRepresentation();
64+
self::assertSame(
65+
[
66+
'class' => 'CSSFunction',
67+
'components' => [
68+
[
69+
'class' => 'Size',
70+
'number' => 300.0,
71+
'unit' => 'px',
72+
],
73+
[
74+
'class' => 'RuleValueList',
75+
'components' => [
76+
[
77+
'class' => 'Size',
78+
'number' => 50.0,
79+
'unit' => 'vh',
80+
],
81+
[
82+
'class' => 'string',
83+
'value' => $operator,
84+
],
85+
[
86+
'class' => 'Size',
87+
'number' => 10.0,
88+
'unit' => 'px',
89+
],
90+
],
91+
'separator' => ' ',
92+
],
93+
],
94+
'separator' => ',',
95+
'name' => 'max',
96+
],
97+
$result
98+
);
6599
}
66100

67101
/**

0 commit comments

Comments
 (0)