Ejemplo n.º 1
0
 /**
  * @param NewImageEvent $event
  */
 private function updateImageResource(NewImageEvent $event)
 {
     $event->image()->setAttribute('url', "{$this->filesystemEndpoint()}/image/{$event->image()->filename()}");
     $event->image()->setAttribute('filename', '');
     $event->image()->save();
 }
Ejemplo n.º 2
0
 /**
  * Should keep the image id.
  */
 public function testImage()
 {
     $image = new Image();
     $event = new NewImageEvent($image);
     $this->assertSame($image->id, $event->image()->id);
 }