for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the G.L.S.R. Apps package.
*
* (c) Dev-Int Création <[email protected]>.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Administration\Infrastructure\DataFixtures;
use Administration\Domain\User\Model\User;
use Administration\Domain\User\Model\VO\UserUuid;
use Core\Domain\Common\Model\VO\EmailField;
use Core\Domain\Common\Model\VO\NameField;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface;
use Doctrine\Persistence\ObjectManager;
class UserFixtures extends Fixture implements FixtureGroupInterface
{
final public function load(ObjectManager $manager): void
$user = User::create(
UserUuid::fromString('a136c6fe-8f6e-45ed-91bc-586374791033'),
NameField::fromString('Laurent'),
EmailField::fromString('[email protected]'),
'password',
['admin']
);
$manager->persist($user);
$manager->flush();
}
public static function getGroups(): array
return ['user'];