@@ 780-796 (lines=17) @@ | ||
777 | /** |
|
778 | * @group DDC-2055 |
|
779 | */ |
|
780 | public function testGenerateSelectClauseCustomRenames() |
|
781 | { |
|
782 | $rsm = new ResultSetMappingBuilder($this->em); |
|
783 | ||
784 | $rsm->addRootEntityFromClassMetadata( |
|
785 | CmsUser::class, |
|
786 | 'u', |
|
787 | [ |
|
788 | 'id' => 'id1', |
|
789 | 'username' => 'username2' |
|
790 | ] |
|
791 | ); |
|
792 | ||
793 | $selectClause = $rsm->generateSelectClause(); |
|
794 | ||
795 | self::assertSQLEquals('u.id AS id1, u.status AS status, u.username AS username2, u.name AS name, u.email_id AS email_id', $selectClause); |
|
796 | } |
|
797 | ||
798 | /** |
|
799 | * @group DDC-2055 |
|
@@ 801-810 (lines=10) @@ | ||
798 | /** |
|
799 | * @group DDC-2055 |
|
800 | */ |
|
801 | public function testGenerateSelectClauseRenameTableAlias() |
|
802 | { |
|
803 | $rsm = new ResultSetMappingBuilder($this->em); |
|
804 | ||
805 | $rsm->addRootEntityFromClassMetadata(CmsUser::class, 'u'); |
|
806 | ||
807 | $selectClause = $rsm->generateSelectClause(['u' => 'u1']); |
|
808 | ||
809 | self::assertSQLEquals('u1.id AS id, u1.status AS status, u1.username AS username, u1.name AS name, u1.email_id AS email_id', $selectClause); |
|
810 | } |
|
811 | ||
812 | /** |
|
813 | * @group DDC-2055 |