-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d8aa36
commit e2ac82e
Showing
1 changed file
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
namespace AnzuSystems\CoreDamBundle\Tests\Data\Fixtures; | ||
|
||
use AnzuSystems\CommonBundle\DataFixtures\Fixtures\AbstractFixtures; | ||
use AnzuSystems\CoreDamBundle\App; | ||
use AnzuSystems\CoreDamBundle\DataFixtures\AssetLicenceFixtures as BaseAssetLicenceFixtures; | ||
use AnzuSystems\CoreDamBundle\Domain\User\UserManager; | ||
use AnzuSystems\CoreDamBundle\Tests\Data\Entity\User; | ||
|
@@ -53,20 +54,36 @@ private function getData(): Generator | |
$licenceBlog = $this->assetLicenceFixtures->getOneFromRegistry(AssetLicenceFixtures::LICENCE_ID); | ||
$licenceCms = $this->baseAssetLicenceFixtures->getOneFromRegistry(BaseAssetLicenceFixtures::DEFAULT_LICENCE_ID); | ||
|
||
yield (new User()) | ||
$userBlog = (new User()) | ||
->setId(User::ID_BLOG_USER) | ||
->setEmail('[email protected]') | ||
->setAssetLicences(new ArrayCollection([$licenceCms, $licenceBlog])) | ||
->setUserToExtSystems(new ArrayCollection([$licenceCms->getExtSystem(), $licenceBlog->getExtSystem()])) | ||
->setEnabled(true) | ||
->setCreatedAt(App::getAppDate()) | ||
->setModifiedAt(App::getAppDate()) | ||
; | ||
$userBlog | ||
->setCreatedBy($userBlog) | ||
->setModifiedBy($userBlog) | ||
; | ||
|
||
yield $userBlog; | ||
|
||
yield (new User()) | ||
$userCms = (new User()) | ||
->setId(User::ID_CMS_USER) | ||
->setEmail('[email protected]') | ||
->setAssetLicences(new ArrayCollection([$licenceCms])) | ||
->setUserToExtSystems(new ArrayCollection([$licenceCms->getExtSystem()])) | ||
->setEnabled(true) | ||
->setCreatedAt(App::getAppDate()) | ||
->setModifiedAt(App::getAppDate()) | ||
; | ||
$userCms | ||
->setCreatedBy($userCms) | ||
->setModifiedBy($userCms) | ||
; | ||
|
||
yield $userCms; | ||
} | ||
} |