Skip to content

Commit fe8a2de

Browse files
committed
minor #61360 [Mailer] Fix expected exception message to include quotes around "http(s)://" (santysisi)
This PR was merged into the 7.4 branch. Discussion ---------- [Mailer] Fix expected exception message to include quotes around "http(s)://" | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | no | License | MIT ### What does this PR do? This PR updates a test assertion to match the actual exception message being thrown in the code. The test was previously expecting the message: `<failingType> endpoint needs to be provided without http(s)://.` But the actual exception thrown is: `<failingType> endpoint needs to be provided without "http(s)://".` The discrepancy caused the test to fail. This fix ensures the test correctly reflects the expected output, including the necessary double quotes. ### Changes made - Updated `$this->expectExceptionMessage(...)` to include the quoted string `"http(s)://"`. No other logic or behavior has been changed. ### References * [MicrosoftGraphTransportFactory.php#L47-L53](https://github.com/symfony/symfony/blob/7.4/src/Symfony/Component/Mailer/Bridge/MicrosoftGraph/Transport/MicrosoftGraphTransportFactory.php#L47-L53) The exception is thrown with `"http(s)://"` in quotes. * [MicrosoftGraphTransportFactoryTest.php#L87](https://github.com/symfony/symfony/blob/7.4/src/Symfony/Component/Mailer/Bridge/MicrosoftGraph/Tests/Transport/MicrosoftGraphTransportFactoryTest.php#L87) The test incorrectly expects the message without quotes. Commits ------- e4398e6 [Mailer] Fix expected exception message to include quotes around "http(s)://"
2 parents de952d2 + e4398e6 commit fe8a2de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Mailer/Bridge/MicrosoftGraph/Tests/Transport/MicrosoftGraphTransportFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function testValidatesHttpNotProvided(string $graph, string $auth, string
8484
$dsn = new Dsn('microsoftgraph+api', $graph, self::USER, self::PASSWORD, null, ['tenantId' => self::TENANT, 'authEndpoint' => $auth]);
8585

8686
$this->expectException(InvalidArgumentException::class);
87-
$this->expectExceptionMessage($failingType.' endpoint needs to be provided without http(s)://.');
87+
$this->expectExceptionMessage($failingType.' endpoint needs to be provided without "http(s)://".');
8888
$factory->create($dsn);
8989
}
9090

0 commit comments

Comments
 (0)