Minor - rename function to getManager to getEntityManager

pull/3965/head
Julio 3 years ago
parent 2067c4176f
commit e1026d3308
  1. 3
      src/CoreBundle/Entity/AbstractResource.php
  2. 2
      tests/ChamiloTestTrait.php
  3. 2
      tests/CoreBundle/Api/UserRelUserTest.php
  4. 2
      tests/CoreBundle/Controller/AssetControllerTest.php
  5. 6
      tests/CoreBundle/Repository/AssetRepositoryTest.php
  6. 4
      tests/CoreBundle/Repository/BranchSyncRepositoryTest.php
  7. 2
      tests/CoreBundle/Repository/CareerRepositoryTest.php
  8. 8
      tests/CoreBundle/Repository/CourseCategoryRepositoryTest.php
  9. 2
      tests/CoreBundle/Repository/ExtraFieldRepositoryTest.php
  10. 2
      tests/CoreBundle/Repository/ExtraFieldValuesRepositoryTest.php
  11. 2
      tests/CoreBundle/Repository/GradeBookCategoryRepositoryTest.php
  12. 2
      tests/CoreBundle/Repository/GroupRepositoryTest.php
  13. 2
      tests/CoreBundle/Repository/LanguageRepositoryTest.php
  14. 10
      tests/CoreBundle/Repository/MessageRepositoryTest.php
  15. 2
      tests/CoreBundle/Repository/Node/SessionRepositoryTest.php
  16. 6
      tests/CoreBundle/Repository/Node/UserRepositoryTest.php
  17. 2
      tests/CoreBundle/Repository/PromotionRepositoryTest.php
  18. 4
      tests/CoreBundle/Repository/ResourceNodeRepositoryTest.php
  19. 2
      tests/CoreBundle/Repository/SequenceRepositoryTest.php
  20. 2
      tests/CoreBundle/Repository/SessionRepositoryTest.php
  21. 4
      tests/CoreBundle/Repository/SkillRepositoryTest.php
  22. 2
      tests/CoreBundle/Repository/TagRepositoryTest.php
  23. 6
      tests/CoreBundle/Tool/ToolChainTest.php
  24. 2
      tests/CourseBundle/Repository/CAnnouncementAttachmentRepositoryTest.php
  25. 2
      tests/CourseBundle/Repository/CAnnouncementRepositoryTest.php
  26. 2
      tests/CourseBundle/Repository/CAttendanceRepositoryTest.php
  27. 2
      tests/CourseBundle/Repository/CCalendarEventRepositoryTest.php
  28. 2
      tests/CourseBundle/Repository/CForumCategoryRepositoryTest.php
  29. 2
      tests/CourseBundle/Repository/CForumRepositoryTest.php
  30. 2
      tests/CourseBundle/Repository/CGroupCategoryRepositoryTest.php
  31. 2
      tests/CourseBundle/Repository/CGroupRepositoryTest.php
  32. 2
      tests/CourseBundle/Repository/CLinkCategoryRepositoryTest.php
  33. 2
      tests/CourseBundle/Repository/CLinkRepositoryTest.php
  34. 2
      tests/CourseBundle/Repository/CLpCategoryRepositoryTest.php
  35. 2
      tests/CourseBundle/Repository/CLpRepositoryTest.php
  36. 2
      tests/CourseBundle/Repository/CQuizRepositoryTest.php
  37. 2
      tests/CourseBundle/Repository/CStudentPublicationRepositoryTest.php
  38. 2
      tests/CourseBundle/Repository/CSurveyRepositoryTest.php
  39. 2
      tests/CourseBundle/Repository/CThematicRepositoryTest.php
  40. 2
      tests/CourseBundle/Settings/SettingsCourseManagerTest.php

@ -191,8 +191,7 @@ abstract class AbstractResource
public function addGroupLink(Course $course, Session $session = null, CGroup $group = null) public function addGroupLink(Course $course, Session $session = null, CGroup $group = null)
{ {
$resourceLink = new ResourceLink(); $resourceLink = (new ResourceLink())
$resourceLink
->setCourse($course) ->setCourse($course)
->setSession($session) ->setSession($session)
->setGroup($group) ->setGroup($group)

@ -138,7 +138,7 @@ trait ChamiloTestTrait
return $localTime->setTimezone(new \DateTimeZone('UTC'))->format('c'); return $localTime->setTimezone(new \DateTimeZone('UTC'))->format('c');
} }
public function getManager(): EntityManager public function getEntityManager(): EntityManager
{ {
return self::getContainer()->get('doctrine')->getManager(); return self::getContainer()->get('doctrine')->getManager();
} }

@ -23,7 +23,7 @@ class UserRelUserTest extends AbstractApiTest
$user = $this->createUser('user'); $user = $this->createUser('user');
$friend = $this->createUser('friend'); $friend = $this->createUser('friend');
$em = $this->getManager(); $em = $this->getEntityManager();
$userRepo = self::getContainer()->get(UserRepository::class); $userRepo = self::getContainer()->get(UserRepository::class);
$tokenTest = $this->getUserToken( $tokenTest = $this->getUserToken(

@ -22,7 +22,7 @@ class AssetControllerTest extends WebTestCase
$file = $this->getUploadedFile(); $file = $this->getUploadedFile();
/** @var AssetRepository $assetRepo */ /** @var AssetRepository $assetRepo */
$assetRepo = self::getContainer()->get(AssetRepository::class); $assetRepo = self::getContainer()->get(AssetRepository::class);
$em = $this->getManager(); $em = $this->getEntityManager();
// Create asset. // Create asset.
$asset = (new Asset()) $asset = (new Asset())

@ -20,7 +20,7 @@ class AssetRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$assetRepo = self::getContainer()->get(AssetRepository::class); $assetRepo = self::getContainer()->get(AssetRepository::class);
$file = $this->getUploadedFile(); $file = $this->getUploadedFile();
@ -42,7 +42,7 @@ class AssetRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
/** @var AssetRepository $assetRepo */ /** @var AssetRepository $assetRepo */
$assetRepo = self::getContainer()->get(AssetRepository::class); $assetRepo = self::getContainer()->get(AssetRepository::class);
$file = $this->getUploadedFile(); $file = $this->getUploadedFile();
@ -71,7 +71,7 @@ class AssetRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
/** @var AssetRepository $assetRepo */ /** @var AssetRepository $assetRepo */
$assetRepo = self::getContainer()->get(AssetRepository::class); $assetRepo = self::getContainer()->get(AssetRepository::class);

@ -19,7 +19,7 @@ class BranchSyncRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(BranchSyncRepository::class); $repo = self::getContainer()->get(BranchSyncRepository::class);
$item = (new BranchSync()) $item = (new BranchSync())
@ -38,7 +38,7 @@ class BranchSyncRepositoryTest extends AbstractApiTest
{ {
$repo = self::getContainer()->get(BranchSyncRepository::class); $repo = self::getContainer()->get(BranchSyncRepository::class);
$em = $this->getManager(); $em = $this->getEntityManager();
$item = (new BranchSync()) $item = (new BranchSync())
->setBranchName('Branch') ->setBranchName('Branch')
->setAdminName('Julio') ->setAdminName('Julio')

@ -19,7 +19,7 @@ class CareerRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CareerRepository::class); $repo = self::getContainer()->get(CareerRepository::class);
$item = (new Career()) $item = (new Career())

@ -22,7 +22,7 @@ class CourseCategoryRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CourseCategoryRepository::class); $repo = self::getContainer()->get(CourseCategoryRepository::class);
$defaultCount = $repo->count([]); $defaultCount = $repo->count([]);
@ -43,7 +43,7 @@ class CourseCategoryRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
/** @var CourseCategoryRepository $repoCourseCategory */ /** @var CourseCategoryRepository $repoCourseCategory */
$repoCourseCategory = self::getContainer()->get(CourseCategoryRepository::class); $repoCourseCategory = self::getContainer()->get(CourseCategoryRepository::class);
@ -84,7 +84,7 @@ class CourseCategoryRepositoryTest extends AbstractApiTest
{ {
$client = static::createClient(); $client = static::createClient();
$em = $this->getManager(); $em = $this->getEntityManager();
/** @var CourseCategoryRepository $repoCourseCategory */ /** @var CourseCategoryRepository $repoCourseCategory */
$repoCourseCategory = self::getContainer()->get(CourseCategoryRepository::class); $repoCourseCategory = self::getContainer()->get(CourseCategoryRepository::class);
@ -136,7 +136,7 @@ class CourseCategoryRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repoCourseCategory = self::getContainer()->get(CourseCategoryRepository::class); $repoCourseCategory = self::getContainer()->get(CourseCategoryRepository::class);
$defaultCount = $repoCourseCategory->count([]); $defaultCount = $repoCourseCategory->count([]);

@ -19,7 +19,7 @@ class ExtraFieldRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(ExtraFieldRepository::class); $repo = self::getContainer()->get(ExtraFieldRepository::class);
$defaultCount = $repo->count([]); $defaultCount = $repo->count([]);

@ -20,7 +20,7 @@ class ExtraFieldValuesRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$field = (new ExtraField()) $field = (new ExtraField())
->setDisplayText('test') ->setDisplayText('test')

@ -19,7 +19,7 @@ class GradeBookCategoryRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(GradeBookCategoryRepository::class); $repo = self::getContainer()->get(GradeBookCategoryRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class GroupRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(GroupRepository::class); $repo = self::getContainer()->get(GroupRepository::class);
$defaultGroups = $repo->count([]); $defaultGroups = $repo->count([]);
$item = (new Group('new_group')) $item = (new Group('new_group'))

@ -19,7 +19,7 @@ class LanguageRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(LanguageRepository::class); $repo = self::getContainer()->get(LanguageRepository::class);
$defaultCount = $repo->count([]); $defaultCount = $repo->count([]);
$item = (new Language()) $item = (new Language())

@ -27,7 +27,7 @@ class MessageRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$messageRepo = self::getContainer()->get(MessageRepository::class); $messageRepo = self::getContainer()->get(MessageRepository::class);
$userRepo = self::getContainer()->get(UserRepository::class); $userRepo = self::getContainer()->get(UserRepository::class);
@ -76,7 +76,7 @@ class MessageRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$messageTagRepo = self::getContainer()->get(MessageTagRepository::class); $messageTagRepo = self::getContainer()->get(MessageTagRepository::class);
$messageRepo = self::getContainer()->get(MessageRepository::class); $messageRepo = self::getContainer()->get(MessageRepository::class);
@ -161,7 +161,7 @@ class MessageRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$messageAttachmentRepo = self::getContainer()->get(MessageAttachmentRepository::class); $messageAttachmentRepo = self::getContainer()->get(MessageAttachmentRepository::class);
$messageRepo = self::getContainer()->get(MessageRepository::class); $messageRepo = self::getContainer()->get(MessageRepository::class);
@ -202,7 +202,7 @@ class MessageRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$messageAttachmentRepo = self::getContainer()->get(MessageAttachmentRepository::class); $messageAttachmentRepo = self::getContainer()->get(MessageAttachmentRepository::class);
$messageTagRepo = self::getContainer()->get(MessageTagRepository::class); $messageTagRepo = self::getContainer()->get(MessageTagRepository::class);
@ -276,7 +276,7 @@ class MessageRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$messageRepo = self::getContainer()->get(MessageRepository::class); $messageRepo = self::getContainer()->get(MessageRepository::class);
$userRepo = self::getContainer()->get(UserRepository::class); $userRepo = self::getContainer()->get(UserRepository::class);

@ -221,7 +221,7 @@ class SessionRepositoryTest extends AbstractApiTest
public function testGetSessionRelUser(): void public function testGetSessionRelUser(): void
{ {
$em = $this->getManager(); $em = $this->getEntityManager();
$sessionRepo = self::getContainer()->get(SessionRepository::class); $sessionRepo = self::getContainer()->get(SessionRepository::class);
$courseRepo = self::getContainer()->get(CourseRepository::class); $courseRepo = self::getContainer()->get(CourseRepository::class);
$userRepo = self::getContainer()->get(UserRepository::class); $userRepo = self::getContainer()->get(UserRepository::class);

@ -71,7 +71,7 @@ class UserRepositoryTest extends AbstractApiTest
$admin = $this->createUser('admin2'); $admin = $this->createUser('admin2');
$userRepo = self::getContainer()->get(UserRepository::class); $userRepo = self::getContainer()->get(UserRepository::class);
$em = $this->getManager(); $em = $this->getEntityManager();
$this->assertHasNoEntityViolations($admin); $this->assertHasNoEntityViolations($admin);
$admin->addUserAsAdmin(); $admin->addUserAsAdmin();
@ -107,7 +107,7 @@ class UserRepositoryTest extends AbstractApiTest
public function testCreateUserSkipResourceNode(): void public function testCreateUserSkipResourceNode(): void
{ {
$em = $this->getManager(); $em = $this->getEntityManager();
$userRepo = self::getContainer()->get(UserRepository::class); $userRepo = self::getContainer()->get(UserRepository::class);
$user = (new User()) $user = (new User())
@ -174,7 +174,7 @@ class UserRepositoryTest extends AbstractApiTest
public function testAddFriendToUser(): void public function testAddFriendToUser(): void
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$user = $this->createUser('user', 'user'); $user = $this->createUser('user', 'user');
$friend = $this->createUser('friend', 'friend'); $friend = $this->createUser('friend', 'friend');

@ -20,7 +20,7 @@ class PromotionRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(PromotionRepository::class); $repo = self::getContainer()->get(PromotionRepository::class);
$defaultCount = $repo->count([]); $defaultCount = $repo->count([]);

@ -21,7 +21,7 @@ class ResourceNodeRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(ResourceNodeRepository::class); $repo = self::getContainer()->get(ResourceNodeRepository::class);
$repoType = $em->getRepository(ResourceType::class); $repoType = $em->getRepository(ResourceType::class);
@ -49,7 +49,7 @@ class ResourceNodeRepositoryTest extends AbstractApiTest
public function testGetResourceNodeFileContent(): void public function testGetResourceNodeFileContent(): void
{ {
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(ResourceNodeRepository::class); $repo = self::getContainer()->get(ResourceNodeRepository::class);
$repoType = $em->getRepository(ResourceType::class); $repoType = $em->getRepository(ResourceType::class);

@ -19,7 +19,7 @@ class SequenceRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(SequenceRepository::class); $repo = self::getContainer()->get(SequenceRepository::class);
$item = (new Sequence()) $item = (new Sequence())

@ -19,7 +19,7 @@ class SessionRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(SessionRepository::class); $repo = self::getContainer()->get(SessionRepository::class);
$url = $this->getAccessUrl(); $url = $this->getAccessUrl();

@ -61,7 +61,7 @@ class SkillRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$skillRepo = self::getContainer()->get(SkillRepository::class); $skillRepo = self::getContainer()->get(SkillRepository::class);
$assetRepo = self::getContainer()->get(AssetRepository::class); $assetRepo = self::getContainer()->get(AssetRepository::class);
@ -102,7 +102,7 @@ class SkillRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$skillRepo = self::getContainer()->get(SkillRepository::class); $skillRepo = self::getContainer()->get(SkillRepository::class);
$assetRepo = self::getContainer()->get(AssetRepository::class); $assetRepo = self::getContainer()->get(AssetRepository::class);

@ -20,7 +20,7 @@ class TagRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(TagRepository::class); $repo = self::getContainer()->get(TagRepository::class);
$defaultCount = $repo->count([]); $defaultCount = $repo->count([]);

@ -69,7 +69,7 @@ class ToolChainTest extends AbstractApiTest
$toolChain = self::getContainer()->get(ToolChain::class); $toolChain = self::getContainer()->get(ToolChain::class);
$em = $this->getManager(); $em = $this->getEntityManager();
$toolRepo = $em->getRepository(Tool::class); $toolRepo = $em->getRepository(Tool::class);
$agendaTool = $toolRepo->findOneBy(['name' => 'agenda']); $agendaTool = $toolRepo->findOneBy(['name' => 'agenda']);
$this->assertNotNull($agendaTool); $this->assertNotNull($agendaTool);
@ -95,7 +95,7 @@ class ToolChainTest extends AbstractApiTest
$types = $tool->getResourceTypes(); $types = $tool->getResourceTypes();
//$icon = $tool->getIcon(); //$icon = $tool->getIcon();
//$this->assertNotEmpty($icon, sprintf("Icons for tool %s doesnt exists", $name)); //$this->assertNotEmpty($icon, sprintf("Icons for tool %s doesnt exists", $name));
//$em = $this->getManager(); //$em = $this->getEntityManager();
/*if (!empty($types)) { /*if (!empty($types)) {
foreach ($types as $entityName) { foreach ($types as $entityName) {
$repo = $em->getRepository($entityName); $repo = $em->getRepository($entityName);
@ -127,7 +127,7 @@ class ToolChainTest extends AbstractApiTest
$this->assertSame($countBefore, \count($tools)); $this->assertSame($countBefore, \count($tools));
$em = $this->getManager(); $em = $this->getEntityManager();
// Delete BranchSync // Delete BranchSync
$branchRepo = $em->getRepository(BranchSync::class); $branchRepo = $em->getRepository(BranchSync::class);

@ -21,7 +21,7 @@ class CAnnouncementAttachmentRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CAnnouncementRepository::class); $repo = self::getContainer()->get(CAnnouncementRepository::class);
$repoAttachment = self::getContainer()->get(CAnnouncementAttachmentRepository::class); $repoAttachment = self::getContainer()->get(CAnnouncementAttachmentRepository::class);

@ -19,7 +19,7 @@ class CAnnouncementRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CAnnouncementRepository::class); $repo = self::getContainer()->get(CAnnouncementRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CAttendanceRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CAttendanceRepository::class); $repo = self::getContainer()->get(CAttendanceRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -45,7 +45,7 @@ class CCalendarEventRepositoryTest extends AbstractApiTest
$user = $this->createUser('test'); $user = $this->createUser('test');
$resourceNodeId = $user->getResourceNode()->getId(); $resourceNodeId = $user->getResourceNode()->getId();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CCalendarEventRepository::class); $repo = self::getContainer()->get(CCalendarEventRepository::class);
// Current server local time (check your php.ini). // Current server local time (check your php.ini).

@ -19,7 +19,7 @@ class CForumCategoryRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CForumCategoryRepository::class); $repo = self::getContainer()->get(CForumCategoryRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CForumRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CForumRepository::class); $repo = self::getContainer()->get(CForumRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CGroupCategoryRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CGroupCategoryRepository::class); $repo = self::getContainer()->get(CGroupCategoryRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CGroupRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CGroupRepository::class); $repo = self::getContainer()->get(CGroupRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CLinkCategoryRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CLinkCategoryRepository::class); $repo = self::getContainer()->get(CLinkCategoryRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CLinkRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CLinkRepository::class); $repo = self::getContainer()->get(CLinkRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CLpCategoryRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CLpCategoryRepository::class); $repo = self::getContainer()->get(CLpCategoryRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CLpRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CLpRepository::class); $repo = self::getContainer()->get(CLpRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CQuizRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CQuizRepository::class); $repo = self::getContainer()->get(CQuizRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CStudentPublicationRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CStudentPublicationRepository::class); $repo = self::getContainer()->get(CStudentPublicationRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CSurveyRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CSurveyRepository::class); $repo = self::getContainer()->get(CSurveyRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class CThematicRepositoryTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$repo = self::getContainer()->get(CThematicRepository::class); $repo = self::getContainer()->get(CThematicRepository::class);
$course = $this->createCourse('new'); $course = $this->createCourse('new');

@ -19,7 +19,7 @@ class SettingsCourseManagerTest extends AbstractApiTest
{ {
self::bootKernel(); self::bootKernel();
$em = $this->getManager(); $em = $this->getEntityManager();
$settingsManager = self::getContainer()->get(SettingsCourseManager::class); $settingsManager = self::getContainer()->get(SettingsCourseManager::class);
$this->expectException(InvalidArgumentException::class); $this->expectException(InvalidArgumentException::class);

Loading…
Cancel
Save