/** * @test */ public function afterUploadShouldExitEarlyWhenPluginDoesntHaveProfile() { $this->plugin->attachTo($this->filelib); $this->plugin->expects($this->never())->method('createProvidedVersions'); $this->plugin->setProfiles(array('tussi', 'lussi')); $storage = $this->storage; $storage->expects($this->never())->method('storeVersion'); $file = File::create(array('profile' => 'xooxer', 'resource' => Resource::create(array('mimetype' => 'image/xoo')))); $event = new FileEvent($file); $this->plugin->onAfterUpload($event); }