[Messenger] Improve error message readability
Since slashes are escaped, vhosts are not very readable.
This commit is contained in:
parent
cc8cee9111
commit
63bc620efa
@ -449,7 +449,7 @@ class ConnectionTest extends TestCase
|
|||||||
public function testObfuscatePasswordInDsn()
|
public function testObfuscatePasswordInDsn()
|
||||||
{
|
{
|
||||||
$this->expectException('AMQPException');
|
$this->expectException('AMQPException');
|
||||||
$this->expectExceptionMessage('Could not connect to the AMQP server. Please verify the provided DSN. ({"host":"localhost","port":5672,"vhost":"\/","login":"user","password":"********"})');
|
$this->expectExceptionMessage('Could not connect to the AMQP server. Please verify the provided DSN. ({"host":"localhost","port":5672,"vhost":"/","login":"user","password":"********"})');
|
||||||
$factory = new TestAmqpFactory(
|
$factory = new TestAmqpFactory(
|
||||||
$amqpConnection = $this->createMock(\AMQPConnection::class),
|
$amqpConnection = $this->createMock(\AMQPConnection::class),
|
||||||
$amqpChannel = $this->createMock(\AMQPChannel::class),
|
$amqpChannel = $this->createMock(\AMQPChannel::class),
|
||||||
|
@ -384,7 +384,7 @@ class Connection
|
|||||||
$credentials['password'] = '********';
|
$credentials['password'] = '********';
|
||||||
unset($credentials['delay']);
|
unset($credentials['delay']);
|
||||||
|
|
||||||
throw new \AMQPException(sprintf('Could not connect to the AMQP server. Please verify the provided DSN. (%s).', json_encode($credentials)), 0, $e);
|
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);
|
||||||
}
|
}
|
||||||
$this->amqpChannel = $this->amqpFactory->createChannel($connection);
|
$this->amqpChannel = $this->amqpFactory->createChannel($connection);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user