Skip to content

Commit ab78d64

Browse files
committed
[bundle] DefaultTransportFactory should accept DSN like foo:
1 parent a4122cd commit ab78d64

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎pkg/enqueue/Tests/Symfony/DefaultTransportFactoryTest.php‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,24 @@ public function testShouldAllowAddConfigurationAsDsn()
7272
$this->assertEquals(['dsn' => 'dsn://'], $config);
7373
}
7474

75+
/**
76+
* @see https://github.com/php-enqueue/enqueue-dev/issues/356
77+
*
78+
* @group bug
79+
*/
80+
public function testShouldAllowAddConfigurationAsDsnWithoutSlashes()
81+
{
82+
$transport = new DefaultTransportFactory();
83+
$tb = new TreeBuilder();
84+
$rootNode = $tb->root('foo');
85+
86+
$transport->addConfiguration($rootNode);
87+
$processor = new Processor();
88+
$config = $processor->process($tb->buildTree(), ['dsn:']);
89+
90+
$this->assertEquals(['dsn' => 'dsn:'], $config);
91+
}
92+
7593
public function testShouldSetNullTransportByDefault()
7694
{
7795
$transport = new DefaultTransportFactory();

0 commit comments

Comments
 (0)