-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd5cd39
commit 7212d7f
Showing
13 changed files
with
561 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,36 +6,42 @@ | |
|
||
use App\Entity\Permissions\UserPermissions; | ||
use App\Entity\User\User; | ||
use App\Test\Traits\TimeTrait; | ||
use Doctrine\Bundle\FixturesBundle\Fixture; | ||
use Doctrine\Persistence\ObjectManager; | ||
use Ramsey\Uuid\Uuid; | ||
|
||
class AdminFixture extends Fixture | ||
{ | ||
use TimeTrait; | ||
|
||
public const ID = '31c9769f-4195-4fa8-b78d-0b54a1ceb8df'; | ||
public const USERNAME = 'admin#0'; | ||
public const EMAIL = '[email protected]'; | ||
public const EXTERNAL_ID = '000000000000000000'; | ||
|
||
public function load(ObjectManager $manager): void | ||
{ | ||
$permissions = new UserPermissions(Uuid::fromString('22dcc83c-8e72-48e4-8b04-debb6fbdd1c8')); | ||
$permissions->grantAll(); | ||
|
||
$user = new User( | ||
Uuid::fromString(self::ID), | ||
self::USERNAME, | ||
self::EMAIL, | ||
str_repeat('0', 18), | ||
$permissions, | ||
[], | ||
null, | ||
null | ||
); | ||
|
||
$manager->persist($permissions); | ||
$manager->persist($user); | ||
$manager->flush(); | ||
|
||
$this->addReference(self::ID, $user); | ||
$this->withTimeFrozenAt('2020-01-01T00:00:00+00:00', function () use ($manager): void { | ||
$permissions = new UserPermissions(Uuid::fromString('22dcc83c-8e72-48e4-8b04-debb6fbdd1c8')); | ||
$permissions->grantAll(); | ||
|
||
$user = new User( | ||
Uuid::fromString(self::ID), | ||
self::USERNAME, | ||
self::EMAIL, | ||
self::EXTERNAL_ID, | ||
$permissions, | ||
[], | ||
null, | ||
null | ||
); | ||
|
||
$manager->persist($permissions); | ||
$manager->persist($user); | ||
$manager->flush(); | ||
|
||
$this->addReference(self::ID, $user); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,35 +6,42 @@ | |
|
||
use App\Entity\Permissions\UserPermissions; | ||
use App\Entity\User\User; | ||
use App\Test\Traits\TimeTrait; | ||
use Doctrine\Bundle\FixturesBundle\Fixture; | ||
use Doctrine\Persistence\ObjectManager; | ||
use Ramsey\Uuid\Uuid; | ||
|
||
class User1Fixture extends Fixture | ||
{ | ||
use TimeTrait; | ||
|
||
public const ID = '03f6066e-2fe9-44ac-b853-2921483f1950'; | ||
public const USERNAME = 'user#1'; | ||
public const EMAIL = '[email protected]'; | ||
public const EXTERNAL_ID = '111111111111111111'; | ||
public const STEAM_ID = '11111111111111111'; | ||
|
||
public function load(ObjectManager $manager): void | ||
{ | ||
$permissions = new UserPermissions(Uuid::fromString('b62733f6-97dc-4031-b74a-ecb080c09658')); | ||
|
||
$user = new User( | ||
Uuid::fromString(self::ID), | ||
self::USERNAME, | ||
self::EMAIL, | ||
str_repeat('1', 18), | ||
$permissions, | ||
[], | ||
null, | ||
null | ||
); | ||
|
||
$manager->persist($permissions); | ||
$manager->persist($user); | ||
$manager->flush(); | ||
|
||
$this->addReference(self::ID, $user); | ||
$this->withTimeFrozenAt('2020-01-01T00:00:00+00:00', function () use ($manager): void { | ||
$permissions = new UserPermissions(Uuid::fromString('b62733f6-97dc-4031-b74a-ecb080c09658')); | ||
|
||
$user = new User( | ||
Uuid::fromString(self::ID), | ||
self::USERNAME, | ||
self::EMAIL, | ||
self::EXTERNAL_ID, | ||
$permissions, | ||
[], | ||
null, | ||
self::STEAM_ID | ||
); | ||
|
||
$manager->persist($permissions); | ||
$manager->persist($user); | ||
$manager->flush(); | ||
|
||
$this->addReference(self::ID, $user); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,35 +6,42 @@ | |
|
||
use App\Entity\Permissions\UserPermissions; | ||
use App\Entity\User\User; | ||
use App\Test\Traits\TimeTrait; | ||
use Doctrine\Bundle\FixturesBundle\Fixture; | ||
use Doctrine\Persistence\ObjectManager; | ||
use Ramsey\Uuid\Uuid; | ||
|
||
class User2Fixture extends Fixture | ||
{ | ||
use TimeTrait; | ||
|
||
public const ID = '43c65dee-8da8-4198-87da-cb58ecc23508'; | ||
public const USERNAME = 'user#2'; | ||
public const EMAIL = '[email protected]'; | ||
public const EXTERNAL_ID = '222222222222222222'; | ||
public const STEAM_ID = '22222222222222222'; | ||
|
||
public function load(ObjectManager $manager): void | ||
{ | ||
$permissions = new UserPermissions(Uuid::fromString('97f1c390-46e8-47cd-b60d-e9cca1ae892e')); | ||
|
||
$user = new User( | ||
Uuid::fromString(self::ID), | ||
self::USERNAME, | ||
self::EMAIL, | ||
str_repeat('2', 18), | ||
$permissions, | ||
[], | ||
null, | ||
null | ||
); | ||
|
||
$manager->persist($permissions); | ||
$manager->persist($user); | ||
$manager->flush(); | ||
|
||
$this->addReference(self::ID, $user); | ||
$this->withTimeFrozenAt('2020-01-01T00:00:00+00:00', function () use ($manager): void { | ||
$permissions = new UserPermissions(Uuid::fromString('97f1c390-46e8-47cd-b60d-e9cca1ae892e')); | ||
|
||
$user = new User( | ||
Uuid::fromString(self::ID), | ||
self::USERNAME, | ||
self::EMAIL, | ||
self::EXTERNAL_ID, | ||
$permissions, | ||
[], | ||
null, | ||
self::STEAM_ID | ||
); | ||
|
||
$manager->persist($permissions); | ||
$manager->persist($user); | ||
$manager->flush(); | ||
|
||
$this->addReference(self::ID, $user); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,35 +6,42 @@ | |
|
||
use App\Entity\Permissions\UserPermissions; | ||
use App\Entity\User\User; | ||
use App\Test\Traits\TimeTrait; | ||
use Doctrine\Bundle\FixturesBundle\Fixture; | ||
use Doctrine\Persistence\ObjectManager; | ||
use Ramsey\Uuid\Uuid; | ||
|
||
class User3Fixture extends Fixture | ||
{ | ||
use TimeTrait; | ||
|
||
public const ID = '7e1a0cae-e0c3-4b1d-9ce7-671505267a87'; | ||
public const USERNAME = 'user#3'; | ||
public const EMAIL = '[email protected]'; | ||
public const EXTERNAL_ID = '333333333333333333'; | ||
public const STEAM_ID = '33333333333333333'; | ||
|
||
public function load(ObjectManager $manager): void | ||
{ | ||
$permissions = new UserPermissions(Uuid::fromString('7dcfba43-a09c-46c0-9dbd-701442bd4f83')); | ||
|
||
$user = new User( | ||
Uuid::fromString(self::ID), | ||
self::USERNAME, | ||
self::EMAIL, | ||
str_repeat('3', 18), | ||
$permissions, | ||
[], | ||
null, | ||
null | ||
); | ||
|
||
$manager->persist($permissions); | ||
$manager->persist($user); | ||
$manager->flush(); | ||
|
||
$this->addReference(self::ID, $user); | ||
$this->withTimeFrozenAt('2020-01-01T00:00:00+00:00', function () use ($manager): void { | ||
$permissions = new UserPermissions(Uuid::fromString('7dcfba43-a09c-46c0-9dbd-701442bd4f83')); | ||
|
||
$user = new User( | ||
Uuid::fromString(self::ID), | ||
self::USERNAME, | ||
self::EMAIL, | ||
self::EXTERNAL_ID, | ||
$permissions, | ||
[], | ||
null, | ||
self::STEAM_ID | ||
); | ||
|
||
$manager->persist($permissions); | ||
$manager->persist($user); | ||
$manager->flush(); | ||
|
||
$this->addReference(self::ID, $user); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.