Skip to content
Snippets Groups Projects
Commit 5d6f852e authored by Camille Simiand's avatar Camille Simiand
Browse files

Fix tests

parent 2714bc2d
No related branches found
No related tags found
1 merge request!57tuleap-171-test-project-directory-should-be-deleted-after-each-test
Pipeline #818 passed
...@@ -4,7 +4,6 @@ namespace App\Tests\functional; ...@@ -4,7 +4,6 @@ namespace App\Tests\functional;
use App\Entity\Capsule; use App\Entity\Capsule;
use App\Entity\User; use App\Entity\User;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
...@@ -73,7 +72,8 @@ class CapsuleControllerTest extends WebTestCase ...@@ -73,7 +72,8 @@ class CapsuleControllerTest extends WebTestCase
protected function tearDown(): void protected function tearDown(): void
{ {
$file_system = new Filesystem(); $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() $object_manager = $this->getContainer()
->get('doctrine') ->get('doctrine')
...@@ -93,7 +93,7 @@ class CapsuleControllerTest extends WebTestCase ...@@ -93,7 +93,7 @@ class CapsuleControllerTest extends WebTestCase
$this->assertResponseRedirects("/login", 302); $this->assertResponseRedirects("/login", 302);
} }
public function testNoneLoggedUserShouldAccessToCapsulePreview(): void public function testNonLoggedUserShouldAccessToCapsulePreview(): void
{ {
$client = static::createClient(); $client = static::createClient();
...@@ -121,7 +121,7 @@ class CapsuleControllerTest extends WebTestCase ...@@ -121,7 +121,7 @@ class CapsuleControllerTest extends WebTestCase
str_contains('The project doesn\'t exist', $crawler->html()); str_contains('The project doesn\'t exist', $crawler->html());
} }
public function testNoneLoggedUserShouldNotAccessToCapsuleEdition(): void public function testNonLoggedUserShouldNotAccessToCapsuleEdition(): void
{ {
$client = static::createClient(); $client = static::createClient();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment