| 12345678910111213141516171819202122 |
- <?php
- namespace App\Tests\Fixture;
- use App\Tests\Fixture\Factory\Person\PersonFactory;
- use Doctrine\Bundle\FixturesBundle\Fixture;
- use Doctrine\Persistence\ObjectManager;
- use Zenstruck\Foundry\Factory;
- class PersonFixtures extends Fixture
- {
- public function load(ObjectManager $em): void
- {
- PersonFactory::createMany(10, static function () {
- return [
- 'username' => Factory::faker()->name(),
- ];
- });
- $em->flush();
- }
- }
|