/** * set up entity. */ private function setUpEntity() { $emailSendReceive = new EmailSendReceive(); $emailSendReceive->setSentAt(new DateTime('-1 day')); $emailSendReceiveColl = new EmailSendReceiveCollection(); $emailSendReceiveColl->add($emailSendReceive); $this->getPersistCollection()->persist($emailSendReceiveColl); $this->getPersistCollection()->flush(); }
private function setUpEntity($sentAt = '-1 day') { $emailSendReceive = new EmailSendReceive(); $emailSendReceive->setSentAt(new DateTime($sentAt)); $emailSendReceive->setStatus(EmailSendReceive::STATUS_SANDED); $emailSendReceiveColl = new EmailSendReceiveCollection(); $emailSendReceiveColl->add($emailSendReceive); $this->getPersistCollection()->persist($emailSendReceiveColl); $this->getPersistCollection()->flush(); }