8000 [DI] Missing test on YamlFileLoader by maxhelias · Pull Request #34675 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DI] Missing test on YamlFileLoader #34675

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
Nov 28, 2019
Merged
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 @@ -349,6 +349,9 @@ public function testParsesIteratorArgument()
$lazyDefinition = $container->getDefinition('lazy_context');

$this->assertEquals([new IteratorArgument(['k1' => new Reference('foo.baz'), 'k2' => new Reference('service_container')]), new IteratorArgument([])], $lazyDefinition->getArguments(), '->load() parses lazy arguments');

$message = 'The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.';
$this->assertSame($message, $container->getDefinition('deprecated_service')->getDeprecationMessage('deprecated_service'));
}

public function testAutowire()
Expand Down Expand Up @@ -717,4 +720,17 @@ public function testOverriddenDefaultsBindings()

$this->assertSame('overridden', $container->get('bar')->quz);
}

/**
* @group legacy
* @expectedDeprecation The configuration key "factory" is unsupported for the service "foo" which is defined as an alias in %s.
* @expectedDeprecation The configuration key "parent" is unsupported for the service "foo" which is defined as an alias in %s.
*/
public function testAliasDefinitionContainsUnsupportedElements()
{
$container = new ContainerBuilder();
$loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml'));
$loader->load('legacy_invalid_alias_definition.yml');
$this->assertTrue($container->has('foo'));
}
}
0