Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Memorekall Member New
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rekall
Memorekall Member New
Commits
5d6f852e
Commit
5d6f852e
authored
3 years ago
by
Camille Simiand
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests
parent
2714bc2d
No related branches found
No related tags found
1 merge request
!57
tuleap-171-test-project-directory-should-be-deleted-after-each-test
Pipeline
#818
passed
3 years ago
Stage: test
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/functional/CapsuleControllerTest.php
+4
-4
4 additions, 4 deletions
tests/functional/CapsuleControllerTest.php
with
4 additions
and
4 deletions
tests/functional/CapsuleControllerTest.php
+
4
−
4
View file @
5d6f852e
...
@@ -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
testNon
e
LoggedUserShouldAccessToCapsulePreview
():
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
testNon
e
LoggedUserShouldNotAccessToCapsuleEdition
():
void
public
function
testNonLoggedUserShouldNotAccessToCapsuleEdition
():
void
{
{
$client
=
static
::
createClient
();
$client
=
static
::
createClient
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment