Skip to content

Commit 9bfa67f

Browse files
committed
Add changes suggested in code review
1 parent a1a9a61 commit 9bfa67f

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ Please also have a look at our
4242

4343
### Fixed
4444

45-
- Revert broken support for multiple comments (#740)
4645
- Fix type errors in PHP strict mode (#664)
4746
- Fix undefined local variable in `CalcFunction::parse()` (#593)
4847
- Fix PHP notice caused by parsing invalid color values having less than 6

tests/ParserTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,25 @@ public function flatCommentExtractingOneComment(): void
11721172
self::assertSame('Find Me!', $comments[0]->getComment());
11731173
}
11741174

1175+
/**
1176+
* @test
1177+
*/
1178+
public function flatCommentExtractingTwoComments(): void
1179+
{
1180+
self::markTestSkipped('This is currently broken.');
1181+
1182+
$parser = new Parser('div {/*Find Me!*/left:10px; /*Find Me Too!*/text-align:left;}');
1183+
$document = $parser->parse();
1184+
$contents = $document->getContents();
1185+
$divRules = $contents[0]->getRules();
1186+
$rule1Comments = $divRules[0]->getComments();
1187+
$rule2Comments = $divRules[1]->getComments();
1188+
self::assertCount(1, $rule1Comments);
1189+
self::assertCount(1, $rule2Comments);
1190+
self::assertEquals('Find Me!', $rule1Comments[0]->getComment());
1191+
self::assertEquals('Find Me Too!', $rule2Comments[0]->getComment());
1192+
}
1193+
11751194
/**
11761195
* @test
11771196
*/

0 commit comments

Comments
 (0)