示例#1
0
 /**
  * Disable the package filter for all command, but for install and update command.
  *
  * @param CommandEvent $event
  */
 public function onPluginCommand(CommandEvent $event)
 {
     if (!in_array($event->getCommandName(), array('install', 'update'))) {
         $this->packageFilter->setEnabled(false);
     }
 }
 /**
  * @dataProvider getDataProviderForDisableTest
  *
  * @param $packageName
  * @param $version
  * @param $minimumStability
  * @param array $rootRequires
  * @param $validSkip
  */
 public function testDisabledFilterWithInstalledPackage($packageName, $version, $minimumStability, array $rootRequires, $validSkip)
 {
     $this->init($rootRequires, $minimumStability);
     $this->filter->setEnabled(false);
     $this->assertSame($validSkip, $this->filter->skip($this->assetType, $packageName, $version));
 }