Exemplo n.º 1
0
 public function testSetDeletedAt()
 {
     $email = new Email();
     $dateTime = new \DateTime();
     $email->setDeletedAt($dateTime);
     $this->assertEquals($dateTime, $email->getDeletedAt());
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $faker = Factory::create();
     for ($i = 0; $i < 10; $i++) {
         $email = new Email();
         $email->setSubject($faker->sentence(6));
         $email->setBody($faker->paragraph(4));
         $email->setCompany($this->getReference('company-' . $faker->numberBetween(0, 9)));
         $email->setEmployee($this->getReference('employee-' . $faker->numberBetween(0, 9)));
         $this->addReference('email-' . $i, $email);
         $manager->persist($email);
     }
     $manager->flush();
 }