update plan create test

This commit is contained in:
2023-12-08 13:25:02 +03:00
parent 29c2adf109
commit 52b29346e3
2 changed files with 36 additions and 13 deletions

View File

@@ -1,6 +1,8 @@
<?php
namespace Database\Factories;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
use FakerRestaurant\Provider\en_US\Restaurant;
use Illuminate\Database\Eloquent\Factories\Factory;
@@ -34,10 +36,12 @@ class PlanFactory extends Factory
'description' => $this->faker->text(),
];
Storage::fake('plans');
return [
'name' => $this->faker->foodName(),
// 'image' => $this->faker->image('application/storage/fake_images', 640, 480, null, false),
'image' => storage_path('public/img/Photo_C.png'),
// 'image' => UploadedFile::fake()->image('plans/Photo_C.png'),
'image' => UploadedFile::fake()->image('plan.png'),
'duration' => $this->faker->randomElement([7, 14,21]),
'state' => $this->faker->randomElement(['active', 'draft', 'archived']),
'type' => $typeBody,