Skip to content

Commit

Permalink
Merge pull request #15 from andrewdyer/2.x
Browse files Browse the repository at this point in the history
2.x
  • Loading branch information
andrewdyer authored Feb 19, 2021
2 parents a7c5d8b + 6304dfd commit 9c22cd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Unit">
<testsuite name="unit">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<php>
<env name="MAILER_HOST" value=""/>
<env name="MAILER_PORT" value=""/>
<env name="MAILER_ENCRYPTION" value=""/>
<env name="MAILER_USERNAME" value=""/>
<env name="MAILER_PASSWORD" value=""/>
<env name="MAILER_DEFAULT_FROM_ADDRESS" value=""/>
Expand Down
11 changes: 6 additions & 5 deletions tests/MailerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ final class MailerTest extends TestCase
{
public function testCanConfigureTransport(): void
{
$host = 'localhost';
$port = 25;
$protocol = 'tls';
$username = 'username';
$password = 'password';
$host = getenv('MAILER_HOST');
$port = getenv('MAILER_PORT');
$protocol = getenv('MAILER_ENCRYPTION');
$username = getenv('MAILER_USERNAME');
$password = getenv('MAILER_PASSWORD');

$mailer = new Mailer(new Twig(__DIR__), compact('host', 'port', 'username', 'password', 'protocol'));

Expand All @@ -38,6 +38,7 @@ public function testCanSendMessage(): void
'port' => getenv('MAILER_PORT'),
'username' => getenv('MAILER_USERNAME'),
'password' => getenv('MAILER_PASSWORD'),
'protocol' => getenv('MAILER_ENCRYPTION'),
]);

$mailer->setDefaultFrom($address, $name);
Expand Down

0 comments on commit 9c22cd5

Please sign in to comment.