replace expectExceptionMessageRegExp() with expectExceptionMessageMatches()

This commit is contained in:
Christian Flothmann 2020-09-20 09:48:58 +02:00
parent ccecffeff6
commit 593a94c932
3 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ EOT;
public function testCreateWithNotSupportedScheme()
{
$this->expectException(UnsupportedSchemeException::class);
$this->expectExceptionMessageRegExp('#The ".*" scheme is not supported#');
$this->expectErrorMessageMatches('#The ".*" scheme is not supported#');
$sut = new NativeTransportFactory();
$sut->create(Dsn::fromString('sendmail://default'));

View File

@ -78,7 +78,7 @@ final class SlackTransportTest extends TestCase
public function testSendWithErrorResponseThrows(): void
{
$this->expectException(TransportException::class);
$this->expectExceptionMessageRegExp('/testErrorCode/');
$this->expectExceptionMessageMatches('/testErrorCode/');
$response = $this->createMock(ResponseInterface::class);
$response->expects($this->exactly(2))

View File

@ -26,7 +26,7 @@ final class CompiledClassMetadataFactoryTest extends TestCase
public function testItThrowAnExceptionWhenCacheFileIsNotFound()
{
$this->expectException(\RuntimeException::class);
$this->expectExceptionMessageRegExp('#File ".*/Fixtures/not-found-serializer.class.metadata.php" could not be found.#');
$this->expectExceptionMessageMatches('#File ".*/Fixtures/not-found-serializer.class.metadata.php" could not be found.#');
$classMetadataFactory = $this->createMock(ClassMetadataFactoryInterface::class);
new CompiledClassMetadataFactory(__DIR__.'/../../Fixtures/not-found-serializer.class.metadata.php', $classMetadataFactory);