Skip to content

Commit f233498

Browse files
committed
Merge branch '5.1' into 5.2
* 5.1: Use ::class keyword when possible
2 parents f353251 + f3a43b3 commit f233498

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Tests/Transport/AmqpReceiverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testItReturnsTheDecodedMessageToTheHandler()
4747

4848
public function testItThrowsATransportExceptionIfItCannotAcknowledgeMessage()
4949
{
50-
$this->expectException('Symfony\Component\Messenger\Exception\TransportException');
50+
$this->expectException(\Symfony\Component\Messenger\Exception\TransportException::class);
5151
$serializer = $this->createMock(SerializerInterface::class);
5252
$amqpEnvelope = $this->createAMQPEnvelope();
5353
$connection = $this->getMockBuilder(Connection::class)->disableOriginalConstructor()->getMock();
@@ -61,7 +61,7 @@ public function testItThrowsATransportExceptionIfItCannotAcknowledgeMessage()
6161

6262
public function testItThrowsATransportExceptionIfItCannotRejectMessage()
6363
{
64-
$this->expectException('Symfony\Component\Messenger\Exception\TransportException');
64+
$this->expectException(\Symfony\Component\Messenger\Exception\TransportException::class);
6565
$serializer = $this->createMock(SerializerInterface::class);
6666
$amqpEnvelope = $this->createAMQPEnvelope();
6767
$connection = $this->getMockBuilder(Connection::class)->disableOriginalConstructor()->getMock();

Tests/Transport/AmqpSenderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function testContentTypeHeaderDoesNotOverwriteAttribute()
104104

105105
public function testItThrowsATransportExceptionIfItCannotSendTheMessage()
106106
{
107-
$this->expectException('Symfony\Component\Messenger\Exception\TransportException');
107+
$this->expectException(\Symfony\Component\Messenger\Exception\TransportException::class);
108108
$envelope = new Envelope(new DummyMessage('Oy'));
109109
$encoded = ['body' => '...', 'headers' => ['type' => DummyMessage::class]];
110110

Tests/Transport/ConnectionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ConnectionTest extends TestCase
3232

3333
public function testItCannotBeConstructedWithAWrongDsn()
3434
{
35-
$this->expectException('InvalidArgumentException');
35+
$this->expectException(\InvalidArgumentException::class);
3636
$this->expectExceptionMessage('The given AMQP DSN "amqp://:" is invalid.');
3737
Connection::fromDsn('amqp://:');
3838
}
@@ -546,7 +546,7 @@ public function testItDelaysTheMessageWithADifferentRoutingKeyAndTTLs()
546546

547547
public function testObfuscatePasswordInDsn()
548548
{
549-
$this->expectException('AMQPException');
549+
$this->expectException(\AMQPException::class);
550550
$this->expectExceptionMessage('Could not connect to the AMQP server. Please verify the provided DSN. ({"host":"localhost","port":5672,"vhost":"/","login":"user","password":"********"})');
551551
$factory = new TestAmqpFactory(
552552
$amqpConnection = $this->createMock(\AMQPConnection::class),

0 commit comments

Comments
 (0)