Skip to content

Commit

Permalink
Issue #101: Don't keep container singleton in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
donquixote committed Nov 10, 2024
1 parent f6f198f commit 04e5d29
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions tests/src/Fixtures/FixturesUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,13 @@

class FixturesUtil {

/**
* @var \Symfony\Component\DependencyInjection\ContainerBuilder
*/
private static ContainerBuilder $container;

/**
* Builds a container with services for adaptism tests.
*
* @return \Symfony\Component\DependencyInjection\ContainerBuilder New container.
* New container.
*/
public static function getContainer(): ContainerBuilder {
return self::$container ??= self::buildContainer();
}

/**
* @return \Symfony\Component\DependencyInjection\ContainerBuilder
*/
private static function buildContainer(): ContainerBuilder {
$container = new ContainerBuilder();
(new CommonServiceProvider())->register($container);
(new EggPackage())->register($container);
Expand Down

0 comments on commit 04e5d29

Please sign in to comment.