diff --git a/src/DataFixtures/AppPollFixtures.php b/src/DataFixtures/AppPollFixtures.php index d1938c0..5daa700 100644 --- a/src/DataFixtures/AppPollFixtures.php +++ b/src/DataFixtures/AppPollFixtures.php @@ -14,14 +14,19 @@ class AppPollFixtures extends Fixture { $owner = new Owner(); $owner->setEmail( 'tktest@tktest.com' ) - ->setPseudo( 'tk_TEST' ); + ->setPseudo( 'tk_TEST' ) + ->setModifierToken( uniqid() ); + $voter = new Owner(); + $voter->setEmail( 'testing_vote_people@tktest.com' ) + ->setPseudo( 'voting_people_TEST' ) + ->setModifierToken( uniqid() ); // $product = new Product(); $poll = new Poll(); $poll->setTitle( 'citron ou orange' ); $poll->setKind( 'text' ); $poll->setDescription( 'votre sorbert préféré' ); - $poll->setAdminKey( 'dskjfsfdljkdsjlkdsfkjdsjdlkfs' ); + $poll->setAdminKey( uniqid() ); $poll->setModificationPolicy( 'nobody' ); $poll->setCreationDate( new \DateTime() ); $poll->setExpiracyDate( new \DateTime() ); @@ -54,7 +59,7 @@ class AppPollFixtures extends Fixture { $poll->setTitle( 'démo sondage de texte 2' ); $poll->setDescription( 'description du sondage 2' ); $poll->setKind( 'date' ); - $poll->setAdminKey( 'dskjfsfdljkdsjlkdsfkjdsjdlkfs' ); + $poll->setAdminKey( uniqid() ); $poll->setModificationPolicy( 'self' ); $poll->setMailOnComment( true ); $poll->setCreationDate( new \DateTime() ); @@ -70,7 +75,7 @@ class AppPollFixtures extends Fixture { $poll->setPassword( md5( 'mot_de_passe_super' ) ); $poll->setModificationPolicy( 'everybody' ); $poll->setDescription( 'description du sondage' ); - $poll->setAdminKey( 'dskjfsfdljkdsjlkdsfkjdsjdlkfs' ); + $poll->setAdminKey( uniqid() ); $poll->setCustomUrl( 'boudoum_podom_podom' ); $poll->setCreationDate( new \DateTime() ); $poll->setExpiracyDate( new \DateTime() ); @@ -81,6 +86,7 @@ class AppPollFixtures extends Fixture { $manager->persist( $poll ); $manager->persist( $owner ); + $manager->persist( $voter ); $manager->flush(); }