2022-01-14 14:43:21 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace App\Test\Fixture;
|
|
|
|
|
|
|
|
use Cake\TestSuite\Fixture\TestFixture;
|
|
|
|
|
|
|
|
class SharingGroupsFixture extends TestFixture
|
|
|
|
{
|
|
|
|
public $connection = 'test';
|
|
|
|
|
|
|
|
public const SHARING_GROUP_A_ID = 1;
|
|
|
|
public const SHARING_GROUP_B_ID = 2;
|
|
|
|
|
|
|
|
public function init(): void
|
|
|
|
{
|
|
|
|
$faker = \Faker\Factory::create();
|
|
|
|
|
|
|
|
$this->records = [
|
|
|
|
[
|
|
|
|
'id' => self::SHARING_GROUP_A_ID,
|
|
|
|
'uuid' => $faker->uuid(),
|
|
|
|
'name' => 'Sharing Group A',
|
2022-01-14 17:43:53 +01:00
|
|
|
'releasability' => 'Sharing Group A releasability',
|
2022-01-14 14:43:21 +01:00
|
|
|
'description' => 'Sharing Group A description',
|
|
|
|
'organisation_id' => OrganisationsFixture::ORGANISATION_A_ID,
|
|
|
|
'user_id' => UsersFixture::USER_ADMIN_ID,
|
|
|
|
'active' => true,
|
|
|
|
'local' => true,
|
|
|
|
'created' => $faker->dateTime()->getTimestamp(),
|
|
|
|
'modified' => $faker->dateTime()->getTimestamp()
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'id' => self::SHARING_GROUP_B_ID,
|
|
|
|
'uuid' => $faker->uuid(),
|
|
|
|
'name' => 'Sharing Group B',
|
2022-01-14 17:43:53 +01:00
|
|
|
'releasability' => 'Sharing Group B releasability',
|
2022-01-14 14:43:21 +01:00
|
|
|
'description' => 'Sharing Group B description',
|
|
|
|
'organisation_id' => OrganisationsFixture::ORGANISATION_B_ID,
|
|
|
|
'user_id' => UsersFixture::USER_ADMIN_ID,
|
|
|
|
'active' => true,
|
|
|
|
'local' => true,
|
|
|
|
'created' => $faker->dateTime()->getTimestamp(),
|
|
|
|
'modified' => $faker->dateTime()->getTimestamp()
|
|
|
|
],
|
|
|
|
];
|
|
|
|
parent::init();
|
|
|
|
}
|
|
|
|
}
|