8000 Fix test · symfony/symfony@9e9c6c7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e9c6c7

Browse files
committed
Fix test
1 parent 55fff84 commit 9e9c6c7

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
"require-dev": {
105105
"amphp/http-client": "^4.2",
106106
"amphp/http-tunnel": "^1.0",
107+
"async-aws/core": "^0.5.1",
108+
"async-aws/ses": "^0.4",
107109
"cache/integration-tests": "dev-master",
108110
"doctrine/annotations": "~1.0",
109111
"doctrine/cache": "~1.6",
@@ -129,8 +131,7 @@
129131
"phpdocumentor/reflection-docblock": "^3.0|^4.0",
130132
"twig/cssinliner-extra": "^2.12",
131133
"twig/inky-extra": "^2.12",
132-
"twig/markdown-extra": "^2.12",
133-
"async-aws/ses": "^0.4"
134+
"twig/markdown-extra": "^2.12"
134135
},
135136
"conflict": {
136137
"masterminds/html5": "<2.6",

src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiTransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function testSendThrowsForErrorResponse()
117117
->text('Hello There!');
118118

119119
$this->expectException(HttpTransportException::class);
120-
$this->expectExceptionMessage('Unable to send an email: "i\'m a teapot" (code "418").');
120+
$this->expectExceptionMessage('Unable to send an email: i\'m a teapot (code 418).');
121121
$transport->send($mail);
122122
}
123123
}

src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpTransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function testSendThrowsForErrorResponse()
117117
->text('Hello There!');
118118

119119
$this->expectException(HttpTransportException::class);
120-
$this->expectExceptionMessage('Unable to send an email: "i\'m a teapot" (code "418").');
120+
$this->expectExceptionMessage('Unable to send an email: i\'m a teapot (code 418).');
121121
$transport->send($mail);
122122
}
123123
}

src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesApiAsyncAwsTransport.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Mailer\Bridge\Amazon\Transport;
1313

14-
use AsyncAws\Core\Configuration;
1514
use AsyncAws\Ses\Input\SendEmailRequest;
1615
use AsyncAws\Ses\ValueObject\Content;
1716
use Symfony\Component\Mailer\Envelope;
@@ -29,8 +28,8 @@ class SesApiAsyncAwsTransport extends SesHttpAsyncAwsTransport
2928
public function __toString(): string
3029
{
3130
$configuration = $this->sesClient->getConfiguration();
32-
if (($endpoint = $configuration->get('endpoint')) === (new Configuration())->get('endpoint')) {
33-
$endpoint = parse_url($endpoint);
31+
if (!$configuration->isDefault('endpoint')) {
32+
$endpoint = parse_url($configuration->get('endpoint'));
3433
$host = $endpoint['host'].($endpoint['port'] ?? null ? ':'.$endpoint['port'] : '');
3534
} else {
3635
$host = $configuration->get('region');

src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesHttpAsyncAwsTransport.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Mailer\Bridge\Amazon\Transport;
1313

14-
use AsyncAws\Core\Configuration;
1514
use AsyncAws\Core\Exception\Http\HttpException;
1615
use AsyncAws\Ses\Input\SendEmailRequest;
1716
use AsyncAws\Ses\SesClient;
@@ -40,8 +39,8 @@ public function __construct(SesClient $sesClient, EventDispatcherInterface $disp
4039
public function __toString(): string
4140
{
4241
$configuration = $this->sesClient->getConfiguration();
43-
if (($endpoint = $configuration->get('endpoint')) === (new Configuration())->get('endpoint')) {
44-
$endpoint = parse_url($endpoint);
42+
if (!$configuration->isDefault('endpoint')) {
43+
$endpoint = parse_url($configuration->get('endpoint'));
4544
$host = $endpoint['host'].($endpoint['port'] ?? null ? ':'.$endpoint['port'] : '');
4645
} else {
4746
$host = $configuration->get('region');

src/Symfony/Component/Mailer/Bridge/Amazon/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"symfony/mailer": "^4.4|^5.0"
2222
},
2323
"require-dev": {
24+
"async-aws/core": "^0.5.1",
2425
"async-aws/ses": "^0.4",
2526
"symfony/http-client": "^4.4|^5.0"
2627
},

0 commit comments

Comments
 (0)
0