Skip to content

Commit 7ea7d95

Browse files
committed
run env tests for Symfony 3.4+ only
1 parent e9c5625 commit 7ea7d95

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/enqueue/Tests/Symfony/DefaultTransportFactoryTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
1010
use Symfony\Component\Config\Definition\Processor;
1111
use Symfony\Component\DependencyInjection\ContainerBuilder;
12+
use Symfony\Component\HttpKernel\Kernel;
1213

1314
class DefaultTransportFactoryTest extends TestCase
1415
{
@@ -268,6 +269,10 @@ public function testShouldCreateDriverFromDsn($dsn, $expectedName)
268269

269270
public function testShouldCreateConnectionFactoryFromEnvironmentDSN()
270271
{
272+
if (version_compare(Kernel::VERSION, '3.4', '<')) {
273+
$this->markTestSkipped('This functionality only works on Symfony 3.4 or higher');
274+
}
275+
271276
$env = str_replace(['\\', ':'], '', strtoupper(uniqid(__METHOD__)));
272277
putenv("$env=null:");
273278

@@ -294,6 +299,10 @@ public function testShouldCreateConnectionFactoryFromEnvironmentDSN()
294299

295300
public function testShouldCreateConnectionFactoryFromEnvironmentWithResolveProviderDSN()
296301
{
302+
if (version_compare(Kernel::VERSION, '3.4', '<')) {
303+
$this->markTestSkipped('This functionality only works on Symfony 3.4 or higher');
304+
}
305+
297306
$env = str_replace(['\\', ':'], '', strtoupper(uniqid(__METHOD__)));
298307
putenv("$env=file:");
299308

0 commit comments

Comments
 (0)