function test_it_loads_plugins_only_once() { ArrowPluginLoader::$instance = null; $options = array('plugin' => 'TestArrowPlugin', 'arrowVersion' => '2.0.5'); ArrowPluginLoader::load($this->one, $options); do_action('plugins_loaded'); do_action('plugins_loaded'); $expected = array('one'); $this->assertEquals($expected, $GLOBALS['arrowPlugins']); $this->assertTrue(ArrowPluginLoader::getInstance()->loaded); }
function register() { $loader = ArrowPluginLoader::getInstance(); $loader->register($this); $this->didRegister = true; }
function test_it_register_bootstrap_with_loader_if_requirements_are_satisfied() { $this->bootstrap->start(); $actual = ArrowPluginLoader::getInstance()->isRegistered($this->bootstrap); $this->assertTrue($actual); }