/** * testCase */ public function testSetCollection() { $collection = $this->getMock('Enlight_Plugin_PluginCollection'); $this->bootstrap->setCollection(null); $this->assertNull($this->bootstrap->Collection()); $this->bootstrap->setCollection($collection); $this->assertInstanceOf('Enlight_Plugin_PluginCollection', $this->bootstrap->Collection()); }
/** * Registers the given plugin bootstrap. The Enlight_Plugin_PluginCollection instance is * set into the plugin by using the Enlight_Plugin_Bootstrap::setCollection() method. * The name of the plugin is used as array key. * * @param Enlight_Plugin_Bootstrap $plugin * @return Enlight_Plugin_PluginManager */ public function registerPlugin(Enlight_Plugin_Bootstrap $plugin) { $plugin->setCollection($this); $this->plugins[$plugin->getName()] = $plugin; return $this; }