Skip to content

Commit d838a6f

Browse files
authored
Create Symfony log dir in tests (#172)
* Create Symfony log dir in tests * Create log dir only when not exists
1 parent ae3dd99 commit d838a6f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/symfony/src/Kernel.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ public function getProjectDir(): string
4040
return \dirname(__DIR__);
4141
}
4242

43+
public function getLogDir(): string
44+
{
45+
$logDir = parent::getLogDir();
46+
if (!\is_dir($logDir)) {
47+
\mkdir($logDir, recursive: true);
48+
}
49+
50+
return $logDir;
51+
}
52+
4353
protected function configureContainer(ContainerConfigurator $container): void
4454
{
4555
$container->extension('framework', [

0 commit comments

Comments
 (0)