diff --git a/tests/Markdown/MarkdownTest.php b/tests/Markdown/MarkdownTest.php index a5331dfabd..b7304d26b9 100644 --- a/tests/Markdown/MarkdownTest.php +++ b/tests/Markdown/MarkdownTest.php @@ -274,7 +274,7 @@ public function it_uses_table_of_contents_on_demand()
Baz qux.
EOT, $markdown); - $this->assertEquals(<<<'EOT' + $expected = <<<'EOT'Foo bar.
Baz qux.
-EOT, - rtrim(Markdown::withTableOfContents()->parse($markdown)) +EOT; + + // Make assertion without newlines because they differ between versions of commonmark. + $this->assertEquals( + str($expected)->replace("\n", ''), + str(Markdown::withTableOfContents()->parse($markdown))->trim()->replace("\n", '') ); } }