mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-16 13:24:31 +02:00
Added tests for RedirectController
This commit is contained in:
parent
40ca5bd0e4
commit
45a624d768
15 changed files with 509 additions and 6 deletions
37
src/DataFixtures/GroupFixtures.php
Normal file
37
src/DataFixtures/GroupFixtures.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace App\DataFixtures;
|
||||
|
||||
use App\Entity\UserSystem\Group;
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
|
||||
class GroupFixtures extends Fixture
|
||||
{
|
||||
public const ADMINS = 'group-admin';
|
||||
public const USERS = 'group-users';
|
||||
public const READONLY = 'group-readonly';
|
||||
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
$admins = new Group();
|
||||
$admins->setName('admins');
|
||||
|
||||
$this->setReference(self::ADMINS, $admins);
|
||||
$manager->persist($admins);
|
||||
|
||||
$readonly = new Group();
|
||||
$readonly->setName('readonly');
|
||||
|
||||
$this->setReference(self::READONLY, $readonly);
|
||||
$manager->persist($readonly);
|
||||
|
||||
$users = new Group();
|
||||
$users->setName('users');
|
||||
|
||||
$this->setReference(self::USERS, $users);
|
||||
$manager->persist($users);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue