From eec2feb8b30a6936a6b7f9094b07e7b25e350e5a Mon Sep 17 00:00:00 2001 From: Deltik Date: Thu, 8 Nov 2018 21:05:11 -0600 Subject: [PATCH] pluginsTest::testBanner() e_parse cases See https://github.com/e107inc/e107/issues/3547 for details. --- tests/unit/pluginsTest.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/unit/pluginsTest.php b/tests/unit/pluginsTest.php index 8fb5b4912..64ddbb4e3 100644 --- a/tests/unit/pluginsTest.php +++ b/tests/unit/pluginsTest.php @@ -130,14 +130,23 @@ $tp = e107::getParser(); + // XXX: Contradicts https://github.com/e107inc/e107/issues/3547#issuecomment-437163733 $result = $tp->parseTemplate("{BANNER=e107promo}",true); - $this->assertContains("assertContains("parseTemplate("{BANNER=e107promo}",false, + e107::getScBatch('banner', true)); + $this->assertContains("parseTemplate("{BANNER=e107promo}",false); + $this->assertEquals("", $result); $this->pluginUninstall('banner'); - $result2 = $tp->parseTemplate("{BANNER=e107promo}",true); + $result = $tp->parseTemplate("{BANNER=e107promo}",true); // The expected value below was the actual observed output when the assertion was written: - $this->assertEquals(' ', $result2, "Banner shortcode is not returning an empty value, despite banner being uninstalled"); + $this->assertEquals(' ', $result, + "Banner shortcode is not returning an empty value, despite banner being uninstalled"); } public function testChatbox_Menu()