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