function testUI() { // When plugin is inactive, do not display the shortcodes $shortcake = new Shortcode_UI(); $shortcake->shortcodes = array(); $o = new GambitPBSandwichShortcodeBBPress(); $o->sandwich_bbp_shortcodes(); foreach ($this->shortcodes as $tag) { $this->assertEmpty($shortcake->get_shortcode($tag), $tag . ' should should not be included if parent plugin is deactivated'); } // When plugin is active, display the shortcodes $shortcake = Shortcode_UI::get_instance(); $shortcake->shortcodes = array(); $result = activate_plugin('bbpress/bbpress.php'); $o = new GambitPBSandwichShortcodeBBPress(); $o->sandwich_bbp_shortcodes(); foreach ($this->shortcodes as $tag) { $this->assertNotEmpty($shortcake->get_shortcode($tag), $tag . ' should should be included if parent plugin is activated'); } }