/**
  * Tests all the getters.
  *
  * @dataProvider patchEventDataProvider
  */
 public function testGetters($event_name, PackageInterface $package, $url, $description)
 {
     $patch_event = new PatchEvent($event_name, $package, $url, $description);
     $this->assertEquals($event_name, $patch_event->getName());
     $this->assertEquals($package, $patch_event->getPackage());
     $this->assertEquals($url, $patch_event->getUrl());
     $this->assertEquals($description, $patch_event->getDescription());
 }
 protected function afterPatchGitCommit(PatchEvent $event, PackageInterface $package)
 {
     if (!$this->git['commit']) {
         return;
     }
     $packagePath = $this->installer->getPackageBasePath($package);
     $packageName = $package->getName();
     $url = $event->getUrl();
     $description = $event->getDescription();
     $this->io->write('  - Committing patch <info>' . $url . '</info> <comment>' . $description . '</comment> for package <info>' . $packageName . '</info> to GIT.');
     $this->executeCommand('cd %s && git add --all . && { git diff --cached --quiet || git commit -m "' . $this->git['commit-prefix'] . 'Applied patch ' . $url . ' (' . $description . ') for ' . $packageName . '."; }', $packagePath);
     $this->afterCommit($package);
 }