minor #38186 [Messenger][minor ]Improve connection message readability (4.4) (l-vo)
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger][minor ]Improve connection message readability (4.4)
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Same as #38185 but for 4.4.
I created 2 PR since bridges directory has moved in 5.1 (to ease merge)
Commits
-------
63bc620efa
[Messenger] Improve error message readability
This commit is contained in:
commit
e368bb4517
@ -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