Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DI] Fix suspicious test #31944

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

Merged
merged 1 commit into from
Jun 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* @author Roland Franssen <[email protected]>
*
* @internal
*/
class TreeWithoutRootNodeException extends \RuntimeException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,15 @@ public function testEnvWithVariableNode(): void

/**
* @group legacy
* @expectedDeprecation A tree builder without a root node is deprecated since Symfony 4.2 and will not be supported anymore in 5.0.
*/
public function testConfigurationWithoutRootNode(): void
{
$container = new ContainerBuilder();
$container->registerExtension(new EnvExtension(new EnvConfigurationWithoutRootNode()));
$container->loadFromExtension('env_extension');
$container->loadFromExtension('env_extension', ['foo' => 'bar']);

$this->doProcess($container);

$this->addToAssertionCount(1);
(new ValidateEnvPlaceholdersPass())->process($container);
}

public function testEmptyConfigFromMoreThanOneSource()
Expand Down Expand Up @@ -332,7 +331,7 @@ class EnvConfigurationWithoutRootNode implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
return new TreeBuilder('env_extension');
return new TreeBuilder();
}
}

Expand Down