Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ jobs:

- name: Execute tests
run: vendor/bin/phpunit --verbose
env:
AWS_ACCESS_KEY_ID: random_key
AWS_SECRET_ACCESS_KEY: random_secret

- name: Store artifacts
uses: actions/upload-artifact@v2
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"phpstan/phpstan": "^1.0",
"predis/predis": "^1.1.9",
"phpunit/phpunit": "^9.5.8",
"symfony/amazon-mailer": "^6.0",
"symfony/cache": "^6.0"
},
"provide": {
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Mail/MailManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ protected function createSesTransport(array $config)
return $factory->create(new Dsn(
'ses+api',
'default',
$config['key'],
$config['secret'],
$config['key'] ?? null,
$config['secret'] ?? null,
$config['port'] ?? null,
$config
));
Expand Down
30 changes: 30 additions & 0 deletions tests/Mail/MailSesTransportTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Illuminate\Tests\Mail;

use Illuminate\Config\Repository;
use Illuminate\Container\Container;
use Illuminate\Mail\MailManager;
use PHPUnit\Framework\TestCase;

class MailSesTransportTest extends TestCase
{
public function testGetTransport()
{
$container = new Container;

$container->singleton('config', function () {
return new Repository([
'services.ses' => [
'region' => 'us-east-1',
],
]);
});

$manager = new MailManager($container);

$transport = $manager->createSymfonyTransport(['transport' => 'ses']);

$this->assertSame('ses+api://random_key@us-east-1', $transport->__toString());
}
}