From ade9789a6ee05957d82a75048c8576af66186d5f Mon Sep 17 00:00:00 2001
From: Sebastien Curt <sebastien.curt@tetras-libre.fr>
Date: Tue, 12 Apr 2022 11:19:35 +0200
Subject: [PATCH] Force legacy directory creation on tests set up

---
 tests/functional/CapsuleControllerTest.php | 3 +++
 tests/functional/ProjectControllerTest.php | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/tests/functional/CapsuleControllerTest.php b/tests/functional/CapsuleControllerTest.php
index 7b033b3..804c5ae 100644
--- a/tests/functional/CapsuleControllerTest.php
+++ b/tests/functional/CapsuleControllerTest.php
@@ -17,6 +17,9 @@ class CapsuleControllerTest extends WebTestCase
     protected function setUp(): void
     {
         $fileSystem = new Filesystem();
+        if (!$fileSystem->exists(self::TEST_DIR_PATH)) {
+            $fileSystem->mkdir(self::TEST_DIR_PATH, 0644);
+        }
         $this->assertTrue(
             $fileSystem->exists(self::TEST_DIR_PATH),
             'The directory \'' . self::TEST_DIR_PATH . '\' should exists'
diff --git a/tests/functional/ProjectControllerTest.php b/tests/functional/ProjectControllerTest.php
index 49df986..e7daa45 100644
--- a/tests/functional/ProjectControllerTest.php
+++ b/tests/functional/ProjectControllerTest.php
@@ -22,6 +22,9 @@ class ProjectControllerTest extends WebTestCase
     protected function setUp(): void
     {
         $fileSystem = new Filesystem();
+        if (!$fileSystem->exists(self::TEST_DIR_PATH)) {
+            $fileSystem->mkdir(self::TEST_DIR_PATH, 0644);
+        }
         $this->assertTrue(
             $fileSystem->exists(self::TEST_DIR_PATH),
             'The directory \'' . self::TEST_DIR_PATH . '\' should exists'
-- 
GitLab