diff --git a/Tests/Transport/ConnectionTest.php b/Tests/Transport/ConnectionTest.php index 4c135cd..06ef855 100644 --- a/Tests/Transport/ConnectionTest.php +++ b/Tests/Transport/ConnectionTest.php @@ -30,7 +30,7 @@ final class ConnectionTest extends TestCase public function testFromInvalidDsn() { $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('The given Beanstalkd DSN "beanstalkd://" is invalid.'); + $this->expectExceptionMessage('The given Beanstalkd DSN is invalid.'); Connection::fromDsn('beanstalkd://'); } diff --git a/Transport/Connection.php b/Transport/Connection.php index a8aaeae..7ce26ee 100644 --- a/Transport/Connection.php +++ b/Transport/Connection.php @@ -59,7 +59,7 @@ public function __construct(array $configuration, PheanstalkInterface $client) public static function fromDsn(string $dsn, array $options = []): self { if (false === $components = parse_url($dsn)) { - throw new InvalidArgumentException(sprintf('The given Beanstalkd DSN "%s" is invalid.', $dsn)); + throw new InvalidArgumentException('The given Beanstalkd DSN is invalid.'); } $connectionCredentials = [