diff --git a/tests/App/DataFixtures/ORM/LoadUserData.php b/tests/App/DataFixtures/ORM/LoadUserData.php index c440d5ed..2670829f 100644 --- a/tests/App/DataFixtures/ORM/LoadUserData.php +++ b/tests/App/DataFixtures/ORM/LoadUserData.php @@ -27,7 +27,6 @@ public function load(ObjectManager $manager): void $user->setEmail('foo@bar.com'); $manager->persist($user); - $manager->flush(); $this->addReference('user', $user); diff --git a/tests/AppConfigMongodb/DataFixtures/MongoDB/LoadUserDataFixture.php b/tests/AppConfigMongodb/DataFixtures/MongoDB/LoadUserDataFixture.php index f18f2d2d..a16dd1e1 100755 --- a/tests/AppConfigMongodb/DataFixtures/MongoDB/LoadUserDataFixture.php +++ b/tests/AppConfigMongodb/DataFixtures/MongoDB/LoadUserDataFixture.php @@ -32,13 +32,14 @@ public function load(ObjectManager $manager): void $user->setEmail('foo@bar.com'); $manager->persist($user); - $manager->flush(); $this->addReference('user', $user); - $user = clone $this->getReference('user'); + $user2 = new User(); + $user2->setName('alice bar'); + $user2->setEmail('alice@bar.com'); - $manager->persist($user); + $manager->persist($user2); $manager->flush(); } }