| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 1 |
| Changes | 3 | ||
| Bugs | 2 | Features | 0 |
| 1 | <?php |
||
| 39 | 1 | private function sendEmail(TestResult $result, array $users) |
|
| 40 | { |
||
| 41 | 1 | $message = \Swift_Message::newInstance() |
|
| 42 | 1 | ->setSubject($result->getTest()->getName() . ' ' . $result->getStatus()) |
|
| 43 | 1 | ->setFrom($this->config['report_from']) |
|
| 44 | 1 | ->setTo($users) |
|
| 45 | 1 | ->setBody( |
|
| 46 | 1 | $this->container->get('templating')->render( |
|
| 47 | 1 | 'OverwatchServiceBundle:Email:result.txt.twig', |
|
| 48 | 1 | ['result' => $result] |
|
| 49 | 1 | ), |
|
| 50 | 'text\plain' |
||
| 51 | 1 | ) |
|
| 52 | 1 | ; |
|
| 53 | |||
| 54 | 1 | $this->container->get('mailer')->send($message); |
|
| 55 | 1 | } |
|
| 56 | } |
||
| 57 |