Exemple #1
0
 public function __invoke(CoreRequest $request)
 {
     $photo = Photo::generateNew($request->quote, $request->upload_mime_type, $request->user_id);
     $this->photo_saver->__invoke($photo);
     $this->event_emitter->emit(new NewPhotoUploaded($photo, $request->upload_temporaty_location));
     return $photo;
 }
 private function andAPhoto()
 {
     $this->photo = Photo::generateNew('quote', 'image/png', new Email('email'));
 }
Exemple #3
0
 private function thenTheRepositoryShouldBeUsed()
 {
     $this->repository->shouldReceive('__invoke')->andReturn(Photo::generateNew('quote', 'image/png', new Email('email')));
 }