feat: include testing, factories, git workflow for testing.
All checks were successful
Tests / Laravel tests (pull_request) Successful in 3m31s
All checks were successful
Tests / Laravel tests (pull_request) Successful in 3m31s
This commit is contained in:
31
database/factories/WorkExperienceFactory.php
Normal file
31
database/factories/WorkExperienceFactory.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\WorkExperience>
|
||||
*/
|
||||
class WorkExperienceFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
{
|
||||
$startDate = fake()->dateTimeBetween('-8 years', '-1 year');
|
||||
|
||||
return [
|
||||
'werkgever' => fake()->company(),
|
||||
'functie' => fake()->jobTitle(),
|
||||
'startdatum' => $startDate->format('Y-m-d'),
|
||||
'einddatum' => fake()->dateTimeBetween($startDate, 'now')->format('Y-m-d'),
|
||||
'beschrijving' => fake()->sentence(),
|
||||
];
|
||||
}
|
||||
|
||||
public function current(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'einddatum' => null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user