Skip to content

Commit f59096f

Browse files
committed
fix tests.
1 parent c336b20 commit f59096f

5 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎pkg/amqp-bunny/Tests/AmqpConnectionFactoryTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function testShouldSupportAmqpLibScheme()
2222
new AmqpConnectionFactory('amqp+bunny:');
2323

2424
$this->expectException(\LogicException::class);
25-
$this->expectExceptionMessage('The given DSN scheme "amqp+foo" is not supported. Could be one of "amqp", "amqp+bunny" only.');
25+
$this->expectExceptionMessage('The given DSN scheme "amqp+foo" is not supported. Could be one of "amqp", "amqps", "amqp+bunny" only.');
2626
new AmqpConnectionFactory('amqp+foo:');
2727
}
2828
}

‎pkg/amqp-ext/AmqpConnectionFactory.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function __construct($config = 'amqp:')
3333
{
3434
$this->config = (new ConnectionConfig($config))
3535
->addSupportedScheme('amqp+ext')
36+
->addSupportedScheme('amqps+ext')
3637
->addDefaultOption('receive_method', 'basic_get')
3738
->parse()
3839
;

‎pkg/amqp-ext/Tests/AmqpConnectionFactoryTest.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ public function testShouldSupportAmqpExtScheme()
2121
{
2222
// no exception here
2323
new AmqpConnectionFactory('amqp+ext:');
24+
new AmqpConnectionFactory('amqps+ext:');
2425

2526
$this->expectException(\LogicException::class);
26-
$this->expectExceptionMessage('The given DSN scheme "amqp+foo" is not supported. Could be one of "amqp", "amqp+ext" only.');
27+
$this->expectExceptionMessage('The given DSN scheme "amqp+foo" is not supported. Could be one of "amqp", "amqps", "amqp+ext", "amqps+ext" only.');
2728
new AmqpConnectionFactory('amqp+foo:');
2829
}
2930

‎pkg/amqp-lib/AmqpConnectionFactory.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function __construct($config = 'amqp:')
3939
{
4040
$this->config = (new ConnectionConfig($config))
4141
->addSupportedScheme('amqp+lib')
42+
->addSupportedScheme('amqps+lib')
4243
->addDefaultOption('stream', true)
4344
->addDefaultOption('insist', false)
4445
->addDefaultOption('login_method', 'AMQPLAIN')

‎pkg/amqp-lib/Tests/AmqpConnectionFactoryTest.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ public function testShouldSupportAmqpLibScheme()
2020
{
2121
// no exception here
2222
new AmqpConnectionFactory('amqp+lib:');
23+
new AmqpConnectionFactory('amqps+lib:');
2324

2425
$this->expectException(\LogicException::class);
25-
$this->expectExceptionMessage('The given DSN scheme "amqp+foo" is not supported. Could be one of "amqp", "amqp+lib" only.');
26+
$this->expectExceptionMessage('The given DSN scheme "amqp+foo" is not supported. Could be one of "amqp", "amqps", "amqp+lib');
2627
new AmqpConnectionFactory('amqp+foo:');
2728
}
2829
}

0 commit comments

Comments
 (0)