Skip to content

Commit b5587b2

Browse files
committed
minor #38245 replace expectExceptionMessageRegExp() with expectExceptionMessageMat… (xabbuh)
This PR was merged into the 5.2-dev branch. Discussion ---------- replace expectExceptionMessageRegExp() with expectExceptionMessageMat… …ches() | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 593a94c replace expectExceptionMessageRegExp() with expectExceptionMessageMatches()
2 parents 66332bc + 593a94c commit b5587b2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function ini_get(\$key)
3838
public function testCreateWithNotSupportedScheme()
3939
{
4040
$this->expectException(UnsupportedSchemeException::class);
41-
$this->expectExceptionMessageRegExp('#The ".*" scheme is not supported#');
41+
$this->expectErrorMessageMatches('#The ".*" scheme is not supported#');
4242

4343
$sut = new NativeTransportFactory();
4444
$sut->create(Dsn::fromString('sendmail://default'));

src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testSendWithEmptyArrayResponseThrows(): void
7878
public function testSendWithErrorResponseThrows(): void
7979
{
8080
$this->expectException(TransportException::class);
81-
$this->expectExceptionMessageRegExp('/testErrorCode/');
81+
$this->expectExceptionMessageMatches('/testErrorCode/');
8282

8383
$response = $this->createMock(ResponseInterface::class);
8484
$response->expects($this->exactly(2))

src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function testItImplementsClassMetadataFactoryInterface()
2626
public function testItThrowAnExceptionWhenCacheFileIsNotFound()
2727
{
2828
$this->expectException(\RuntimeException::class);
29-
$this->expectExceptionMessageRegExp('#File ".*/Fixtures/not-found-serializer.class.metadata.php" could not be found.#');
29+
$this->expectExceptionMessageMatches('#File ".*/Fixtures/not-found-serializer.class.metadata.php" could not be found.#');
3030

3131
$classMetadataFactory = $this->createMock(ClassMetadataFactoryInterface::class);
3232
new CompiledClassMetadataFactory(__DIR__.'/../../Fixtures/not-found-serializer.class.metadata.php', $classMetadataFactory);

0 commit comments

Comments
 (0)