From 5d6f852e4a67a16219667634e0a686d9d67a7c10 Mon Sep 17 00:00:00 2001
From: Camille Simiand <camille.simiand@tetras-libre.fr>
Date: Mon, 14 Feb 2022 15:30:51 +0100
Subject: [PATCH] Fix tests

---
 tests/functional/CapsuleControllerTest.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/functional/CapsuleControllerTest.php b/tests/functional/CapsuleControllerTest.php
index 2282b8c..78b251c 100644
--- a/tests/functional/CapsuleControllerTest.php
+++ b/tests/functional/CapsuleControllerTest.php
@@ -4,7 +4,6 @@ namespace App\Tests\functional;
 
 use App\Entity\Capsule;
 use App\Entity\User;
-use Symfony\Bundle\FrameworkBundle\KernelBrowser;
 use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
 use Symfony\Component\Filesystem\Filesystem;
 
@@ -73,7 +72,8 @@ class CapsuleControllerTest extends WebTestCase
     protected function tearDown(): void
     {
         $file_system = new Filesystem();
-        $file_system->remove(self::TEST_DIR_PATH . self::CAPSULE_NAME);
+
+        $file_system->remove(self::TEST_DIR_PATH . $this->created_capsule->getLinkPath());
 
         $object_manager = $this->getContainer()
             ->get('doctrine')
@@ -93,7 +93,7 @@ class CapsuleControllerTest extends WebTestCase
         $this->assertResponseRedirects("/login", 302);
     }
 
-    public function testNoneLoggedUserShouldAccessToCapsulePreview(): void
+    public function testNonLoggedUserShouldAccessToCapsulePreview(): void
     {
         $client = static::createClient();
 
@@ -121,7 +121,7 @@ class CapsuleControllerTest extends WebTestCase
         str_contains('The project doesn\'t exist', $crawler->html());
     }
 
-    public function testNoneLoggedUserShouldNotAccessToCapsuleEdition(): void
+    public function testNonLoggedUserShouldNotAccessToCapsuleEdition(): void
     {
         $client = static::createClient();
 
-- 
GitLab