1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-28 08:12:42 +01:00

Reload e_shortcode_parser for pluginsTest::testBanner()

e_shortcode_parser normally doesn't need reloading in an e107
installation because installing the "banner" plugin and parsing
shortcodes have always been two separate script calls (page loads).

It would slow down the e107 core to add an e_shortcode_parser reloader
after installing a plugin when the page would later exit without
parsing any shortcodes.
This commit is contained in:
Nick Liu 2018-11-02 12:49:24 -05:00
parent f27636ff14
commit 7c2b4f8f25
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

View File

@ -123,6 +123,11 @@
$this->pluginInstall('banner');
// App needs e_parse_shortcode to be reloaded because another test
// could have initialized e_parse_shortcode already before the
// "banner" plugin was installed.
e107::getScParser()->__construct();
$tp = e107::getParser();
$result = $tp->parseTemplate("{BANNER=e107promo}",true);
@ -348,8 +353,8 @@
$id = 912; // No-follow plugin on e107.org
$this->assertFalse(is_dir(e_PLUGIN."nofollow"), "Plugin nofollow exists before download");
$mp->download($id, '', 'plugin');
$this->assertTrue(is_dir(e_PLUGIN."nofollow"), "Plugin nofollow is missing after download");
$this->pluginInstall('nofollow');