From 3947ca3af17c21f6f3428ba3372f6133b34bde35 Mon Sep 17 00:00:00 2001 From: Jake Hotson Date: Tue, 23 Dec 2025 01:14:25 +0000 Subject: [PATCH] [TASK] Use `getArrayRepresentation()` in `ValueTest` ... in `parsesArithmeticInFunctions()` test. Follows on from #1440. --- tests/Unit/Value/ValueTest.php | 38 ++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Value/ValueTest.php b/tests/Unit/Value/ValueTest.php index 87c282c0..5b34831b 100644 --- a/tests/Unit/Value/ValueTest.php +++ b/tests/Unit/Value/ValueTest.php @@ -60,8 +60,42 @@ public function parsesArithmeticInFunctions(string $operator): void self::DEFAULT_DELIMITERS ); - self::assertInstanceOf(CSSFunction::class, $subject); - self::assertSame('max(300px,50vh ' . $operator . ' 10px)', $subject->render(OutputFormat::createCompact())); + $result = $subject->getArrayRepresentation(); + self::assertSame( + [ + 'class' => 'CSSFunction', + 'components' => [ + [ + 'class' => 'Size', + 'number' => 300.0, + 'unit' => 'px', + ], + [ + 'class' => 'RuleValueList', + 'components' => [ + [ + 'class' => 'Size', + 'number' => 50.0, + 'unit' => 'vh', + ], + [ + 'class' => 'string', + 'value' => $operator, + ], + [ + 'class' => 'Size', + 'number' => 10.0, + 'unit' => 'px', + ], + ], + 'separator' => ' ', + ], + ], + 'separator' => ',', + 'name' => 'max', + ], + $result + ); } /**