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
abc1984a
Commit
abc1984a
authored
3 years ago
by
Camille Simiand
Committed by
Sebastien
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix phpstan level 3 errors
parent
89813173
No related branches found
No related tags found
3 merge requests
!43
tuleap-83-access-my-capsules
,
!42
Draft: access-my-capsules-conflicts-fixed
,
!40
Draft: Tuleap 83 access my capsules
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/functional/ProjectControllerTest.php
+8
-8
8 additions, 8 deletions
tests/functional/ProjectControllerTest.php
tests/functional/RegistrationControllerTest.php
+1
-1
1 addition, 1 deletion
tests/functional/RegistrationControllerTest.php
with
9 additions
and
9 deletions
tests/functional/ProjectControllerTest.php
+
8
−
8
View file @
abc1984a
...
...
@@ -4,7 +4,7 @@ namespace App\Tests\functional;
use
App\Entity\Capsule
;
use
App\Entity\User
;
use
Doctrine\
ORM\Entity
Manager
;
use
Doctrine\
Persistence\Object
Manager
;
use
Symfony\Bundle\FrameworkBundle\KernelBrowser
;
use
Symfony\Bundle\FrameworkBundle\Test\WebTestCase
;
use
Symfony\Component\DomCrawler\Form
;
...
...
@@ -13,7 +13,7 @@ use Symfony\Component\Filesystem\Filesystem;
class
ProjectControllerTest
extends
WebTestCase
{
private
KernelBrowser
$client
;
private
Entity
Manager
$
entity
_manager
;
private
Object
Manager
$
object
_manager
;
private
Form
$form
;
private
const
TEST_DIR_PATH
=
__DIR__
.
'/../../legacy/'
;
private
const
CAPSULE_NAME
=
'TestCapsuleName'
;
...
...
@@ -27,11 +27,11 @@ class ProjectControllerTest extends WebTestCase
self
::
ensureKernelShutdown
();
$this
->
client
=
static
::
createClient
();
$this
->
entity
_manager
=
$this
->
client
->
getContainer
()
$this
->
object
_manager
=
$this
->
client
->
getContainer
()
->
get
(
'doctrine'
)
->
getManager
();
$verified_user
=
$this
->
entity
_manager
$verified_user
=
$this
->
object
_manager
->
getRepository
(
User
::
class
)
->
findOneBy
([
'email'
=>
'defaultUser@localhost.com'
])
;
...
...
@@ -53,10 +53,10 @@ class ProjectControllerTest extends WebTestCase
$file_system
=
new
Filesystem
();
$file_system
->
remove
(
self
::
TEST_DIR_PATH
.
self
::
CAPSULE_NAME
);
$capsule_repository
=
$this
->
entity
_manager
->
getRepository
(
Capsule
::
class
);
$capsule_repository
=
$this
->
object
_manager
->
getRepository
(
Capsule
::
class
);
$last_capsule
=
$capsule_repository
->
findOneBy
([
'name'
=>
self
::
CAPSULE_NAME
]);
$this
->
entity
_manager
->
remove
(
$last_capsule
);
$this
->
entity
_manager
->
flush
();
$this
->
object
_manager
->
remove
(
$last_capsule
);
$this
->
object
_manager
->
flush
();
}
private
function
getDOMDocument
():
\DOMDocument
...
...
@@ -84,7 +84,7 @@ class ProjectControllerTest extends WebTestCase
$this
->
client
->
followRedirect
();
$capsule_repository
=
$this
->
entity
_manager
->
getRepository
(
Capsule
::
class
);
$capsule_repository
=
$this
->
object
_manager
->
getRepository
(
Capsule
::
class
);
$capsule_in_db
=
$capsule_repository
->
findOneBy
([
'name'
=>
self
::
CAPSULE_NAME
]);
self
::
assertInstanceOf
(
Capsule
::
class
,
$capsule_in_db
);
...
...
This diff is collapsed.
Click to expand it.
tests/functional/RegistrationControllerTest.php
+
1
−
1
View file @
abc1984a
...
...
@@ -164,7 +164,7 @@ class RegistrationControllerTest extends WebTestCase
$form
[
'registration_form[email]'
]
=
$userEmail
;
$form
[
'registration_form[plainPassword][first]'
]
=
'password'
;
$form
[
'registration_form[plainPassword][second]'
]
=
'password'
;
$form
[
'registration_form[agreeTerms]'
]
=
1
;
$form
[
'registration_form[agreeTerms]'
]
=
"1"
;
return
$client
->
submit
(
$form
);
}
...
...
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