Ejemplo n.º 1
0
 /**
  * @test
  */
 public function afterUploadDoesAbsolutelyNothingWhenLazyModeEnabled()
 {
     $this->plugin->attachTo($this->filelib);
     $this->plugin->enableLazyMode(true);
     $this->plugin->expects($this->any())->method('areSharedVersionsAllowed')->will($this->returnValue(false));
     $this->plugin->expects($this->never())->method('createProvidedVersions');
     $this->plugin->expects($this->never())->method('getProvidedVersions');
     $this->plugin->setProfiles(array('tussi', 'lussi'));
     $file = File::create(array('resource' => Resource::create(array('mimetype' => 'image/xoo')), 'profile' => 'tussi'))->addVersion(Version::get('reiska'));
     $event = new FileEvent($file);
     $this->plugin->onAfterUpload($event);
 }