replace expectExceptionMessageRegExp() with expectExceptionMessageMatches()
This commit is contained in:
parent
ccecffeff6
commit
593a94c932
@ -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'));
|
||||
|
@ -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))
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user