Example #1
0
 function testGetAllPlugins()
 {
     //The plugins
     $plugins = new MockCollection($this);
     //The plugin factory
     $plugin_factory = new MockPluginFactory($this);
     $plugin_factory->setReturnReference('getAllPlugins', $plugins);
     //The plugins manager
     $pm = new PluginManager($plugin_factory, mock('EventManager'), mock('SiteCache'), mock('ForgeUpgradeConfig'));
     $this->assertReference($pm->getAllPlugins(), $plugins);
 }
 /**
  * Get plugin names that are still installed and which depends on the given plugin
  *
  * @return array of strings
  */
 public function getInstalledDependencies(Plugin $plugin)
 {
     return $this->getMissingDependencies($plugin, $this->plugin_manager->getAllPlugins());
 }