diff --git a/Tests/Transport/ConnectionTest.php b/Tests/Transport/ConnectionTest.php index 1b39dc7..32abfd5 100644 --- a/Tests/Transport/ConnectionTest.php +++ b/Tests/Transport/ConnectionTest.php @@ -33,7 +33,7 @@ class ConnectionTest extends TestCase public function testItCannotBeConstructedWithAWrongDsn() { $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('The given AMQP DSN "amqp://:" is invalid.'); + $this->expectExceptionMessage('The given AMQP DSN is invalid.'); Connection::fromDsn('amqp://:'); } diff --git a/Transport/Connection.php b/Transport/Connection.php index 166031b..0357575 100644 --- a/Transport/Connection.php +++ b/Transport/Connection.php @@ -180,7 +180,7 @@ public static function fromDsn(string $dsn, array $options = [], AmqpFactory $am if (false === $parsedUrl = parse_url($dsn)) { // this is a valid URI that parse_url cannot handle when you want to pass all parameters as options if (!\in_array($dsn, ['amqp://', 'amqps://'])) { - throw new InvalidArgumentException(sprintf('The given AMQP DSN "%s" is invalid.', $dsn)); + throw new InvalidArgumentException('The given AMQP DSN is invalid.'); } $parsedUrl = [];