mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
work on user render test
This commit is contained in:
parent
c3a799cb7d
commit
8d58805abd
@ -16,6 +16,10 @@ use Twig\Environment;
|
||||
|
||||
class UserRenderTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @throws \DateInvalidTimeZoneException
|
||||
* @throws \DateMalformedStringException
|
||||
*/
|
||||
public function renderUserWithJobAndScopeAtCertainDateTest(): void
|
||||
{
|
||||
// Create a user with a certain user job
|
||||
@ -27,23 +31,27 @@ class UserRenderTest extends TestCase
|
||||
$userJob->setLabel(['fr' => 'assistant social']);
|
||||
$scope->setName(['fr' => 'service A']);
|
||||
$user->setLabel('BOB ISLA');
|
||||
|
||||
$userJobHistory = (new User\UserJobHistory())
|
||||
->setUser($user)
|
||||
->setJob($userJob)
|
||||
//setStartDate
|
||||
;
|
||||
|
||||
$userScopeHistory = (new User\UserScopeHistory())
|
||||
->setUser($user)
|
||||
->setScope($scope)
|
||||
;
|
||||
$user->getUserJobHistories()->add($userJobHistory);
|
||||
$user->setMainScope($scope);
|
||||
|
||||
// Change the user job
|
||||
/* // Change the user job
|
||||
$userJobTwo = new UserJob();
|
||||
$userJobTwo->setLabel(['fr' => 'directrice']);
|
||||
/* this automatically creates a UserJobHistory. How to set the date manually though? **/
|
||||
|
||||
// Change the scope
|
||||
$scopeTwo = new Scope();
|
||||
$scopeTwo->setName(['fr' => 'service B']);
|
||||
/* this automatically creates a UserScopeHistory. How to set the date manually though? **/
|
||||
$scopeTwo->setName(['fr' => 'service B']);*/
|
||||
|
||||
|
||||
// Create renderer
|
||||
|
Loading…
x
Reference in New Issue
Block a user