Skip to content

Commit 5994117

Browse files
committed
TestCase - run bootstrapFiles
1 parent 2c1c394 commit 5994117

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Testing/TestCase.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,16 @@ public static function getContainer(): Container
105105

106106
$rootDir = __DIR__ . '/../..';
107107
$containerFactory = new ContainerFactory($rootDir);
108-
self::$containers[$cacheKey] = $containerFactory->create($tmpDir, array_merge([
108+
$container = $containerFactory->create($tmpDir, array_merge([
109109
$containerFactory->getConfigDirectory() . '/config.level8.neon',
110110
], $additionalConfigFiles), []);
111+
self::$containers[$cacheKey] = $container;
112+
113+
foreach ($container->getParameter('bootstrapFiles') as $bootstrapFile) {
114+
(static function (string $file) use ($container): void {
115+
require_once $file;
116+
})($bootstrapFile);
117+
}
111118
}
112119

113120
return self::$containers[$cacheKey];

0 commit comments

Comments
 (0)