Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function send_an_email() |
||
12 | { |
||
13 | $this->loadEnv(); |
||
14 | $subject = "elasticemail-php: Integration test ensuring email send."; |
||
15 | |||
16 | $elasticEmail = new ElasticEmail($_ENV['ELASTIC_EMAIL_API_KEY']); |
||
17 | $response = $elasticEmail->email()->send([ |
||
18 | 'to' => $_ENV['TEST_EMAIL_TO'], |
||
19 | 'from' => $_ENV['TEST_EMAIL_FROM'], |
||
20 | 'subject' => $subject, |
||
21 | 'bodyText' => 'Your mind will answer most questions if you learn ' |
||
22 | . 'to relax and wait for the answer.' |
||
23 | ]); |
||
24 | |||
25 | $this->assertTrue($response->wasSuccessful()); |
||
26 | $this->assertEquals(200, $response->getStatusCode()); |
||
27 | |||
28 | d($response->getBody()); |
||
29 | } |
||
30 | } |
||
31 |