Skip to content

[bundle] add support for %env(resolve:FOO)% feature. #393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
run env tests for Symfony 3.4+ only
  • Loading branch information
makasim committed Mar 3, 2018
commit 7ea7d95199ab8a0f8f5094c67392f1cda67366e1
9 changes: 9 additions & 0 deletions pkg/enqueue/Tests/Symfony/DefaultTransportFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel;

class DefaultTransportFactoryTest extends TestCase
{
Expand Down Expand Up @@ -268,6 +269,10 @@ public function testShouldCreateDriverFromDsn($dsn, $expectedName)

public function testShouldCreateConnectionFactoryFromEnvironmentDSN()
{
if (version_compare(Kernel::VERSION, '3.4', '<')) {
$this->markTestSkipped('This functionality only works on Symfony 3.4 or higher');
}

$env = str_replace(['\\', ':'], '', strtoupper(uniqid(__METHOD__)));
putenv("$env=null:");

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

public function testShouldCreateConnectionFactoryFromEnvironmentWithResolveProviderDSN()
{
if (version_compare(Kernel::VERSION, '3.4', '<')) {
$this->markTestSkipped('This functionality only works on Symfony 3.4 or higher');
}

$env = str_replace(['\\', ':'], '', strtoupper(uniqid(__METHOD__)));
putenv("$env=file:");

Expand Down