2022-01-05 17:44:02 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace App\Test\Fixture;
|
|
|
|
|
|
|
|
use Cake\TestSuite\Fixture\TestFixture;
|
|
|
|
|
|
|
|
class IndividualsFixture extends TestFixture
|
|
|
|
{
|
|
|
|
public $connection = 'test';
|
|
|
|
|
2022-01-07 13:45:52 +01:00
|
|
|
public const INDIVIDUAL_ADMIN_ID = 1;
|
|
|
|
public const INDIVIDUAL_SYNC_ID = 2;
|
|
|
|
public const INDIVIDUAL_ORG_ADMIN_ID = 3;
|
|
|
|
public const INDIVIDUAL_REGULAR_USER_ID = 4;
|
2022-01-11 17:17:04 +01:00
|
|
|
public const INDIVIDUAL_A_ID = 5;
|
2023-04-07 14:08:27 +02:00
|
|
|
public const INDIVIDUAL_B_ID = 6;
|
2022-01-07 13:45:52 +01:00
|
|
|
|
|
|
|
public function init(): void
|
|
|
|
{
|
|
|
|
$faker = \Faker\Factory::create();
|
|
|
|
|
|
|
|
$this->records = [
|
|
|
|
[
|
|
|
|
'id' => self::INDIVIDUAL_ADMIN_ID,
|
|
|
|
'uuid' => $faker->uuid(),
|
|
|
|
'email' => $faker->email(),
|
|
|
|
'first_name' => $faker->firstName,
|
|
|
|
'last_name' => $faker->lastName,
|
|
|
|
'position' => 'admin',
|
|
|
|
'created' => $faker->dateTime()->getTimestamp(),
|
|
|
|
'modified' => $faker->dateTime()->getTimestamp()
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'id' => self::INDIVIDUAL_SYNC_ID,
|
|
|
|
'uuid' => $faker->uuid(),
|
|
|
|
'email' => $faker->email(),
|
|
|
|
'first_name' => $faker->firstName,
|
|
|
|
'last_name' => $faker->lastName,
|
|
|
|
'position' => 'sync',
|
|
|
|
'created' => $faker->dateTime()->getTimestamp(),
|
|
|
|
'modified' => $faker->dateTime()->getTimestamp()
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'id' => self::INDIVIDUAL_ORG_ADMIN_ID,
|
|
|
|
'uuid' => $faker->uuid(),
|
|
|
|
'email' => $faker->email(),
|
|
|
|
'first_name' => $faker->firstName,
|
|
|
|
'last_name' => $faker->lastName,
|
|
|
|
'position' => 'org_admin',
|
|
|
|
'created' => $faker->dateTime()->getTimestamp(),
|
|
|
|
'modified' => $faker->dateTime()->getTimestamp()
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'id' => self::INDIVIDUAL_REGULAR_USER_ID,
|
|
|
|
'uuid' => $faker->uuid(),
|
|
|
|
'email' => $faker->email(),
|
|
|
|
'first_name' => $faker->firstName,
|
|
|
|
'last_name' => $faker->lastName,
|
|
|
|
'position' => 'user',
|
|
|
|
'created' => $faker->dateTime()->getTimestamp(),
|
|
|
|
'modified' => $faker->dateTime()->getTimestamp()
|
2022-01-11 17:17:04 +01:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'id' => self::INDIVIDUAL_A_ID,
|
|
|
|
'uuid' => $faker->uuid(),
|
|
|
|
'email' => $faker->email(),
|
|
|
|
'first_name' => $faker->firstName,
|
|
|
|
'last_name' => $faker->lastName,
|
|
|
|
'position' => 'user',
|
|
|
|
'created' => $faker->dateTime()->getTimestamp(),
|
|
|
|
'modified' => $faker->dateTime()->getTimestamp()
|
2023-04-07 14:08:27 +02:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'id' => self::INDIVIDUAL_B_ID,
|
|
|
|
'uuid' => $faker->uuid(),
|
|
|
|
'email' => $faker->email(),
|
|
|
|
'first_name' => $faker->firstName,
|
|
|
|
'last_name' => $faker->lastName,
|
|
|
|
'position' => 'user',
|
|
|
|
'created' => $faker->dateTime()->getTimestamp(),
|
|
|
|
'modified' => $faker->dateTime()->getTimestamp()
|
2022-01-07 13:45:52 +01:00
|
|
|
]
|
|
|
|
];
|
|
|
|
parent::init();
|
|
|
|
}
|
2022-01-05 17:44:02 +01:00
|
|
|
}
|