From c74ca069f9ce875d104e16ee08d05471d7caf60e Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Wed, 27 Apr 2016 20:54:22 -0400 Subject: [PATCH] Adding a tweak/hack to the test to get green tests across all versions of Michelf --- Tests/FeatureTest.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Tests/FeatureTest.php b/Tests/FeatureTest.php index b47864a..4581b35 100644 --- a/Tests/FeatureTest.php +++ b/Tests/FeatureTest.php @@ -765,7 +765,15 @@ EOF; EOF; - $this->assertEquals($html, $parser->transform($text)); + // 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); } /**