/**
  * @param VersionProviderEvent $event
  */
 public function doUnpublish(VersionProviderEvent $event)
 {
     $versionable = $event->getVersionable();
     if (!$versionable instanceof File) {
         return;
     }
     foreach ($event->getVersions() as $version) {
         $this->publisher->unpublishVersion($versionable, $version);
     }
 }
 /**
  * @test
  */
 public function eventShouldInitializeCorrectly()
 {
     $vp = $this->getMockedVersionProvider();
     $file = File::create();
     $versions = array('tussi', 'lussi');
     $event = new VersionProviderEvent($vp, $file, $versions);
     $this->assertSame($file, $event->getVersionable());
     $this->assertSame($vp, $event->getProvider());
     $this->assertEquals(array(Version::get('tussi'), Version::get('lussi')), $event->getVersions());
 }