| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 18 | public static function addSentEmails(EntityManager $manager, $count = 1) |
||
| 19 | { |
||
| 20 | while ($count > 0) { |
||
| 21 | $sentEmail = new SentEmail(); |
||
| 22 | $sentEmail->setRecipients(array(self::TEST_EMAIL)); |
||
| 23 | $sentEmail->setSent(new \DateTime('2 weeks ago')); |
||
| 24 | $sentEmail->setTemplate(AzineTemplateProvider::NEWSLETTER_TEMPLATE); |
||
| 25 | $sentEmail->setVariables(array()); |
||
| 26 | $sentEmail->setToken(1 == $count ? self::TEST_TOKEN : self::TEST_TOKEN.$count); |
||
| 27 | $manager->persist($sentEmail); |
||
| 28 | |||
| 29 | --$count; |
||
| 30 | } |
||
| 31 | $manager->flush(); |
||
| 32 | } |
||
| 34 |