public function provider() { $pluginName = 'plugin'; $plugin = m::mock('plugin', array('init' => null, 'getName' => $pluginName, 'isMultipleInstanced' => false)); $pluginRegistry = new PluginRegistry(); $pluginRegistry->addPlugin($plugin); return array(array($pluginRegistry, $pluginName, $plugin)); }
/** * * @param \FlyingWhale\Plugin\PluginInterface $plugin */ public function addPlugin($plugin) { $this->pluginRegistry->addPlugin($plugin); $plugin->init($this); }