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