Tests fails #3123
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
Hi, it is strange: $file = UploadedFile::fake()->image('cover.jpg');
ErrorException: fopen(/app/storage/framework/testing/disks/public/1/cover2.jpg): Failed to open stream: Permission denied in /app/vendor/league/flysystem/src/Adapter/Local.php:157 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, media library works well in my project.
But my featur test fails.:
Storage::fake('public');
$category = $this->modelClass::factory()->create();
$url = $this->url.$category->id.'/cover';
$file = UploadedFile::fake()->image('cover.jpg');
$response = $this->json('POST', $url, ['image' => $file], $this->apiAuth());
The storage of the image fails, because of permissions of the file system.
Can someone help me?
Beta Was this translation helpful? Give feedback.
All reactions