Skip to content

Commit

Permalink
minor symfony#52689 [DependencyInjection] Fix tests on configuration …
Browse files Browse the repository at this point in the history
…prepend (alexandre-daubois)

This PR was merged into the 7.1 branch.

Discussion
----------

[DependencyInjection] Fix tests on configuration prepend

| Q             | A
| ------------- | ---
| Branch?       | 7.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

Commits
-------

a206da9 [DependencyInjection] Fix tests on configuration prepend
  • Loading branch information
nicolas-grekas committed Nov 23, 2023
2 parents 638f7d0 + a206da9 commit cda729e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function testFooBundle()
$configPass = new MergeExtensionConfigurationPass(['loaded', 'acme_foo']);
$configPass->process($container);

$this->assertSame([[], ['bar' => 'baz']], $container->getExtensionConfig('loaded'), '->prependExtension() prepends an extension config');
$this->assertSame([['bar' => 'baz'], []], $container->getExtensionConfig('loaded'), '->prependExtension() prepends an extension config');
$this->assertTrue($container->hasDefinition('acme_foo.foo'), '->loadExtension() registers a service');
$this->assertTrue($container->hasDefinition('acme_foo.bar'), '->loadExtension() imports a service');
$this->assertTrue($container->hasParameter('acme_foo.config'), '->loadExtension() sets a parameter');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function configure(DefinitionConfigurator $definition): void

public function prependExtension(ContainerConfigurator $container, ContainerBuilder $builder): void
{
$container->extension('loaded', ['bar' => 'baz'], true);
$builder->prependExtensionConfig('loaded', ['bar' => 'baz']);
}

public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void
Expand Down

0 comments on commit cda729e

Please sign in to comment.