8000 fix · symfony/symfony@0f8161d · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f8161d

Browse files
committed
fix
1 parent 1b10dbf commit 0f8161d

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

src/Symfony/Component/Notifier/Bridge/Mailjet/Tests/MailjetTransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function createTransport(?HttpClientInterface $client = null): TransportI
3131

3232
public function toStringProvider(): iterable
3333
{
34-
yield ['mailjet://Mailjet:authtoken@host.test', $this->createTransport()];
34+
yield ['mailjet://Mailjet@host.test', $this->createTransport()];
3535
}
3636

3737
public function supportedMessagesProvider(): iterable

src/Symfony/Component/Notifier/Test/TransportTestCase.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ public function testCanSetCustomHost()
9898

9999
$transportAsString = (string) $transport;
100100

101-
if (false !== strpos($transportAsString, '@')) {
102-
$this->assertStringContainsString(sprintf('@%s', $customHost), $transportAsString);
103-
} else {
104-
$this->assertStringContainsString(sprintf('://%s', $customHost), $transportAsString);
105-
}
101+
// if (false !== strpos($transportAsString, '@')) {
102+
// $this->assertStringContainsString(sprintf('@%s', $customHost), $transportAsString);
103+
// } else {
104+
// $this->assertStringContainsString(sprintf('://%s', $customHost), $transportAsString);
105+
// }
106+
$this->assertMatchesRegularExpression(sprintf('/^.*\:\/\/(%s|.*(\@%s))/', $customHost, $customHost), (string) $transport);
106107
}
107108

108109
public function testCanSetCustomPort()
@@ -126,10 +127,12 @@ public function testCanSetCustomHostAndPort()
126127

127128
$transportAsString = (string) $transport;
128129

129-
if (false !== strpos($transportAsString, '@')) {
130-
$this->assertStringContainsString(sprintf('@%s:%s', $customHost, $customPort), $transportAsString);
131-
} else {
132-
$this->assertStringContainsString(sprintf('://%s:%s', $customHost, $customPort), $transportAsString);
133-
}
130+
// if (false !== strpos($transportAsString, '@')) {
131+
// $this->assertStringContainsString(sprintf('@%s:%s', $customHost, $customPort), $transportAsString);
132+
// } else {
133+
// $this->assertStringContainsString(sprintf('://%s:%s', $customHost, $customPort), $transportAsString);
134+
// }
135+
136+
$this->assertMatchesRegularExpression(sprintf('/^.*\:\/\/(%s|.*(\@%s)\:%s)/', $customHost, $customHost, $customPort), (string) $transport);
134137
}
135138
}

0 commit comments

Comments
 (0)
0