@@ 551-563 (lines=13) @@ | ||
548 | $this->assertEquals(1, count($user->articles)); |
|
549 | } |
|
550 | ||
551 | public function testOneToMany_ExtraLazyContainsWithFilter() |
|
552 | { |
|
553 | $this->loadLazyFixtureData(); |
|
554 | $user = $this->_em->find(CmsUser::class, $this->userId); |
|
555 | $filteredArticle = $this->_em->find(CmsArticle::class, $this->articleId2); |
|
556 | ||
557 | $this->assertFalse($user->articles->isInitialized()); |
|
558 | $this->assertTrue($user->articles->contains($filteredArticle)); |
|
559 | ||
560 | $this->useCMSArticleTopicFilter(); |
|
561 | ||
562 | $this->assertFalse($user->articles->contains($filteredArticle)); |
|
563 | } |
|
564 | ||
565 | public function testOneToMany_ExtraLazySliceWithFilter() |
|
566 | { |
|
@@ 599-611 (lines=13) @@ | ||
596 | $this->assertEquals(1, count($user->groups)); |
|
597 | } |
|
598 | ||
599 | public function testManyToMany_ExtraLazyContainsWithFilter() |
|
600 | { |
|
601 | $this->loadLazyFixtureData(); |
|
602 | $user = $this->_em->find(CmsUser::class, $this->userId2); |
|
603 | $filteredArticle = $this->_em->find(CmsGroup::class, $this->groupId2); |
|
604 | ||
605 | $this->assertFalse($user->groups->isInitialized()); |
|
606 | $this->assertTrue($user->groups->contains($filteredArticle)); |
|
607 | ||
608 | $this->useCMSGroupPrefixFilter(); |
|
609 | ||
610 | $this->assertFalse($user->groups->contains($filteredArticle)); |
|
611 | } |
|
612 | ||
613 | public function testManyToMany_ExtraLazySliceWithFilter() |
|
614 | { |
@@ 814-826 (lines=13) @@ | ||
811 | /** |
|
812 | * @group DDC-1398 |
|
813 | */ |
|
814 | public function testGetIndexByManyToManyOwningSide() |
|
815 | { |
|
816 | $user = $this->_em->find(CmsUser::class, $this->userId); |
|
817 | /* @var $user CmsUser */ |
|
818 | ||
819 | $queryCount = $this->getCurrentQueryCount(); |
|
820 | ||
821 | $group = $user->groups->get($this->groupname); |
|
822 | ||
823 | $this->assertFalse($user->groups->isInitialized()); |
|
824 | $this->assertEquals($queryCount + 1, $this->getCurrentQueryCount()); |
|
825 | $this->assertSame($group, $this->_em->find(CmsGroup::class, $this->groupId)); |
|
826 | } |
|
827 | ||
828 | /** |
|
829 | * @group DDC-1398 |