public static getSubscribedEvents ( ) : array | ||
return | array | An array of events that the plugin subscribes to |
public static function getSubscribedEvents()
{
return [PackageEvents::PRE_PACKAGE_INSTALL => 'addVersion', PackageEvents::PRE_PACKAGE_UPDATE => 'addVersion', PluginEvents::PRE_FILE_DOWNLOAD => 'addKey'];
}
public function testSubscribesToPreFileDownloadEvent() { $subscribedEvents = Plugin::getSubscribedEvents(); $this->assertEquals($subscribedEvents[PluginEvents::PRE_FILE_DOWNLOAD], 'addKey'); }