/** * @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(); }
/** * Should keep the image id. */ public function testImage() { $image = new Image(); $event = new NewImageEvent($image); $this->assertSame($image->id, $event->image()->id); }