write test for road item projects
This commit is contained in:
23
database/factories/ObservedItemFactory.php
Normal file
23
database/factories/ObservedItemFactory.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class ObservedItemFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'item_name' => $this->faker->name
|
||||
];
|
||||
}
|
||||
}
|
||||
23
database/factories/ProvinceFactory.php
Normal file
23
database/factories/ProvinceFactory.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class ProvinceFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name_fa' => $this->faker->name
|
||||
];
|
||||
}
|
||||
}
|
||||
24
database/factories/RoadItemsProjectFactory.php
Normal file
24
database/factories/RoadItemsProjectFactory.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class RoadItemsProjectFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'item' => $this->faker->numberBetween(1, 10),
|
||||
'sub_item' => $this->faker->numberBetween(1, 10),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -18,8 +18,11 @@ class UserFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'username' => $this->faker->name,
|
||||
'name' => $this->faker->name,
|
||||
'enabled' => true,
|
||||
'confirmed' => 1
|
||||
'confirmed' => 1,
|
||||
'province_fa' => $this->faker->name,
|
||||
'city_fa' => $this->faker->name,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user