@@ 823-835 (lines=13) @@ | ||
820 | /** |
|
821 | * @group DDC-1398 |
|
822 | */ |
|
823 | public function testGetIndexByManyToManyOwningSide() |
|
824 | { |
|
825 | $user = $this->em->find(CmsUser::class, $this->userId); |
|
826 | /* @var $user CmsUser */ |
|
827 | ||
828 | $queryCount = $this->getCurrentQueryCount(); |
|
829 | ||
830 | $group = $user->groups->get($this->groupname); |
|
831 | ||
832 | self::assertFalse($user->groups->isInitialized()); |
|
833 | self::assertEquals($queryCount + 1, $this->getCurrentQueryCount()); |
|
834 | self::assertSame($group, $this->em->find(CmsGroup::class, $this->groupId)); |
|
835 | } |
|
836 | ||
837 | /** |
|
838 | * @group DDC-1398 |
@@ 560-572 (lines=13) @@ | ||
557 | self::assertCount(1, $user->articles); |
|
558 | } |
|
559 | ||
560 | public function testOneToMany_ExtraLazyContainsWithFilter() |
|
561 | { |
|
562 | $this->loadLazyFixtureData(); |
|
563 | $user = $this->em->find(CmsUser::class, $this->userId); |
|
564 | $filteredArticle = $this->em->find(CmsArticle::class, $this->articleId2); |
|
565 | ||
566 | self::assertFalse($user->articles->isInitialized()); |
|
567 | self::assertTrue($user->articles->contains($filteredArticle)); |
|
568 | ||
569 | $this->useCMSArticleTopicFilter(); |
|
570 | ||
571 | self::assertFalse($user->articles->contains($filteredArticle)); |
|
572 | } |
|
573 | ||
574 | public function testOneToMany_ExtraLazySliceWithFilter() |
|
575 | { |
|
@@ 608-620 (lines=13) @@ | ||
605 | self::assertCount(1, $user->groups); |
|
606 | } |
|
607 | ||
608 | public function testManyToMany_ExtraLazyContainsWithFilter() |
|
609 | { |
|
610 | $this->loadLazyFixtureData(); |
|
611 | $user = $this->em->find(CmsUser::class, $this->userId2); |
|
612 | $filteredArticle = $this->em->find(CmsGroup::class, $this->groupId2); |
|
613 | ||
614 | self::assertFalse($user->groups->isInitialized()); |
|
615 | self::assertTrue($user->groups->contains($filteredArticle)); |
|
616 | ||
617 | $this->useCMSGroupPrefixFilter(); |
|
618 | ||
619 | self::assertFalse($user->groups->contains($filteredArticle)); |
|
620 | } |
|
621 | ||
622 | public function testManyToMany_ExtraLazySliceWithFilter() |
|
623 | { |