From 02d9f8b7a4d377d763ef2783989989ac525b6ad3 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Tue, 23 Jan 2018 10:09:23 -0500 Subject: [PATCH] Various test fixes: new versions of Michelf, etc --- Tests/FeatureTest.php | 30 +++++++----------------------- Tests/Parser/ParserManagerTest.php | 5 ----- Tests/fixtures/app/TestKernel.php | 3 ++- 3 files changed, 9 insertions(+), 29 deletions(-) diff --git a/Tests/FeatureTest.php b/Tests/FeatureTest.php index 4581b35..7c0d099 100644 --- a/Tests/FeatureTest.php +++ b/Tests/FeatureTest.php @@ -749,31 +749,15 @@ That's some text with a footnote.[^1] [^1]: And that's the footnote. EOF; - $html = <<That's some text with a footnote.1

- -
-
-
    - -
  1. -

    And that's the footnote. ↩︎

    -
  2. - -
-
- -EOF; - - // newer versions of Michelf add an extra ︎ To make the tests - // pass against ALL versions, we just hack the ︎ into the - // expected string if it isn't there $actualHtml = $parser->transform($text); - if (strpos($actualHtml, '︎') === false) { - $actualHtml = str_replace('↩', '↩︎', $actualHtml); - } - $this->assertEquals($html, $actualHtml); + // asserting a few things instead of comparing full final HTML + // because a few minor things have changed over versions of Michelf + // With assertContains(), tests will pass across all versions + $this->assertContains('

That\'s some text with a footnote.assertContains('