Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
27e2f942
Commit
27e2f942
authored
Jul 04, 2021
by
Julien Jorry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix functionnal unit test
parent
0af74e3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
ApplicationAvailabilityFunctionalTest.php
tests/ApplicationAvailabilityFunctionalTest.php
+4
-5
No files found.
tests/ApplicationAvailabilityFunctionalTest.php
View file @
27e2f942
...
...
@@ -42,17 +42,16 @@ class ApplicationAvailabilityFunctionalTest extends WebTestCase
protected
function
createAuthorizedClient
()
{
// $client = static::createClient();
$client
=
static
::
createClient
([]);
$container
=
static
::
$kernel
->
getContainer
();
$session
=
$container
->
get
(
'session'
);
$person
=
self
::
$kernel
->
getContainer
()
->
get
(
'doctrine'
)
->
getRepository
(
User
::
class
)
->
findOneByUsername
(
'julien.jorry@gmail.com'
);
$session
=
self
::
$container
->
get
(
'session'
);
$person
=
self
::
$container
->
get
(
'doctrine.orm.entity_manager'
)
->
getRepository
(
User
::
class
)
->
findOneByUsername
(
'julien.jorry@gmail.com'
);
$token
=
new
UsernamePasswordToken
(
$person
,
null
,
'main'
,
$person
->
getRoles
());
$session
->
set
(
'_security_mlc_context'
,
serialize
(
$token
));
$session
->
save
();
$client
->
getCookieJar
()
->
set
(
new
Cookie
(
$session
->
getName
(),
$session
->
getId
()));
$cookie
=
new
Cookie
(
$session
->
getName
(),
$session
->
getId
());
$client
->
getCookieJar
()
->
set
(
$cookie
);
return
$client
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment