diff --git a/tests/functional/CapsuleControllerTest.php b/tests/functional/CapsuleControllerTest.php index 2282b8c4d4b3835cdc135f744c64f8ca4cf71a11..78b251ce726922d35b498ecda64443fcc5dab5e7 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();