From 12818a4392785e4fa90c4a07d865d61e56d916d7 Mon Sep 17 00:00:00 2001 From: Jakub Caban Date: Wed, 10 Feb 2021 09:38:11 +0100 Subject: [PATCH] Add missing targetEntity assertion on typed association --- tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php index bad7c1e8fad..7ae471c2257 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php @@ -13,6 +13,7 @@ use Doctrine\Persistence\Mapping\RuntimeReflectionService; use Doctrine\Persistence\Mapping\StaticReflectionService; use Doctrine\Tests\Models\CMS; +use Doctrine\Tests\Models\CMS\CmsEmail; use Doctrine\Tests\Models\Company\CompanyContract; use Doctrine\Tests\Models\CustomType\CustomTypeParent; use Doctrine\Tests\Models\DDC117\DDC117Article; @@ -130,6 +131,7 @@ public function testFieldIsNullableByType(): void // Join table Nullable $cm->mapOneToOne(['fieldName' => 'email', 'joinColumns' => [[]]]); $this->assertFalse($cm->getAssociationMapping('email')['joinColumns'][0]['nullable']); + $this->assertEquals(CmsEmail::class, $cm->getAssociationMapping('email')['targetEntity']); } public function testFieldTypeFromReflection(): void