From 3fc749d97cc18a84d763df4278b1559c84a87c54 Mon Sep 17 00:00:00 2001 From: Sebastien Curt <sebastien.curt@tetras-libre.fr> Date: Tue, 12 Apr 2022 11:06:27 +0200 Subject: [PATCH] Assert on legacy directory exists on tests --- src/Controller/ProjectController.php | 3 --- tests/functional/CapsuleControllerTest.php | 5 +++++ tests/functional/ProjectControllerTest.php | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Controller/ProjectController.php b/src/Controller/ProjectController.php index 37f9d15..b9f1a4f 100755 --- a/src/Controller/ProjectController.php +++ b/src/Controller/ProjectController.php @@ -25,9 +25,6 @@ class ProjectController extends AbstractController } #[Route('/{_locale<%app.supported_locales%>}/project/create', name:'create_project', methods:['POST'])] - /** - * @throws ZipArchiveNotOpeningException - */ public function create( Capsule $capsule, string $video_url diff --git a/tests/functional/CapsuleControllerTest.php b/tests/functional/CapsuleControllerTest.php index dddc2a2..7b033b3 100644 --- a/tests/functional/CapsuleControllerTest.php +++ b/tests/functional/CapsuleControllerTest.php @@ -16,6 +16,11 @@ class CapsuleControllerTest extends WebTestCase protected function setUp(): void { + $fileSystem = new Filesystem(); + $this->assertTrue( + $fileSystem->exists(self::TEST_DIR_PATH), + 'The directory \'' . self::TEST_DIR_PATH . '\' should exists' + ); chdir(self::TEST_DIR_PATH); self::ensureKernelShutdown(); diff --git a/tests/functional/ProjectControllerTest.php b/tests/functional/ProjectControllerTest.php index f264663..49df986 100644 --- a/tests/functional/ProjectControllerTest.php +++ b/tests/functional/ProjectControllerTest.php @@ -21,6 +21,11 @@ class ProjectControllerTest extends WebTestCase protected function setUp(): void { + $fileSystem = new Filesystem(); + $this->assertTrue( + $fileSystem->exists(self::TEST_DIR_PATH), + 'The directory \'' . self::TEST_DIR_PATH . '\' should exists' + ); chdir(self::TEST_DIR_PATH); self::ensureKernelShutdown(); -- GitLab