1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-31 02:32:37 +02:00

pluginsTest::testBanner() e_parse cases

See https://github.com/e107inc/e107/issues/3547 for details.
This commit is contained in:
Deltik 2018-11-08 21:05:11 -06:00
parent e9e9f6288e
commit eec2feb8b3
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

View File

@ -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("<img class='e-banner img-responsive img-fluid'",$result);
$this->assertContains("<img class='e-banner img-responsive img-fluid'", $result);
$result = $tp->parseTemplate("{BANNER=e107promo}",false,
e107::getScBatch('banner', true));
$this->assertContains("<img class='e-banner img-responsive img-fluid'", $result);
$result = $tp->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('&nbsp;', $result2, "Banner shortcode is not returning an empty value, despite banner being uninstalled");
$this->assertEquals('&nbsp;', $result,
"Banner shortcode is not returning an empty value, despite banner being uninstalled");
}
public function testChatbox_Menu()