Skip to content

Commit f3a43b3

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Use ::class keyword when possible
1 parent 6277eb2 commit f3a43b3

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
@@ -30,7 +30,7 @@ class ConnectionTest extends TestCase
3030

3131
public function testItCannotBeConstructedWithAWrongDsn()
3232
{
33-
$this->expectException('InvalidArgumentException');
33+
$this->expectException(\InvalidArgumentException::class);
3434
$this->expectExceptionMessage('The given AMQP DSN "amqp://:" is invalid.');
3535
Connection::fromDsn('amqp://:');
3636
}
@@ -487,7 +487,7 @@ public function testItDelaysTheMessageWithADifferentRoutingKeyAndTTLs()
487487

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

0 commit comments

Comments
 (0)