From 60c0b4213ec8c08f4b32277258b14faa1b7f5be1 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 4 Dec 2025 13:16:40 +0100 Subject: [PATCH 1/2] [TASK] Avoid heredoc in a test This allows the testcase being autoformatted without breaking the tests for PHP 7.2 https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc --- tests/ParserTest.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/ParserTest.php b/tests/ParserTest.php index b80280a77..4fb5ceb20 100644 --- a/tests/ParserTest.php +++ b/tests/ParserTest.php @@ -570,11 +570,10 @@ public function selectorRemoval(): void public function comments(): void { $document = self::parsedStructureForFile('comments'); - $expected = <<render()); } From 44a7d75a720e8a55b4d5d1775d5f832cee2a6fe8 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 4 Dec 2025 13:42:09 +0100 Subject: [PATCH 2/2] Move the LFs to the end of the lines --- tests/ParserTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ParserTest.php b/tests/ParserTest.php index 4fb5ceb20..a2bd4e703 100644 --- a/tests/ParserTest.php +++ b/tests/ParserTest.php @@ -571,9 +571,9 @@ public function comments(): void { $document = self::parsedStructureForFile('comments'); - $expected = '@import url("some/url.css") screen;' - . "\n.foo, #bar {background-color: #000;}" - . "\n@media screen {#foo.bar {position: absolute;}}"; + $expected = "@import url(\"some/url.css\") screen;\n" + . ".foo, #bar {background-color: #000;}\n" + . '@media screen {#foo.bar {position: absolute;}}'; self::assertSame($expected, $document->render()); }