Skip to content

Commit dc5e275

Browse files
committed
* 5.1: [Messenger] Improve error message readability fix filename being cleaned up at end of tests
2 parents 6708628 + 4cbeeb5 commit dc5e275

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Tests/Transport/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ public function testItDelaysTheMessageWithADifferentRoutingKeyAndTTLs()
490490
public function testObfuscatePasswordInDsn()
491491
{
492492
$this->expectException('AMQPException');
493-
$this->expectExceptionMessage('Could not connect to the AMQP server. Please verify the provided DSN. ({"host":"localhost","port":5672,"vhost":"\/","login":"user","password":"********"})');
493+
$this->expectExceptionMessage('Could not connect to the AMQP server. Please verify the provided DSN. ({"host":"localhost","port":5672,"vhost":"/","login":"user","password":"********"})');
494494
$factory = new TestAmqpFactory(
495495
$amqpConnection = $this->createMock(\AMQPConnection::class),
496496
$amqpChannel = $this->createMock(\AMQPChannel::class),

Transport/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ public function channel(): \AMQPChannel
477477
$credentials['password'] = '********';
478478
unset($credentials['delay']);
479479

480-
throw new \AMQPException(sprintf('Could not connect to the AMQP server. Please verify the provided DSN. (%s).', json_encode($credentials)), 0, $e);
480+
throw new \AMQPException(sprintf('Could not connect to the AMQP server. Please verify the provided DSN. (%s).', json_encode($credentials, \JSON_UNESCAPED_SLASHES)), 0, $e);
481481
}
482482
$this->amqpChannel = $this->amqpFactory->createChannel($connection);
483483

0 commit comments

Comments
 (0)