Skip to content

Commit

Permalink
Add missing targetEntity assertion on typed association
Browse files Browse the repository at this point in the history
  • Loading branch information
Lustmored committed Feb 10, 2021
1 parent 430001b commit 12818a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 12818a4

Please sign in to comment.