| Conditions | 2 |
| Paths | 2 |
| Total Lines | 24 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function testIssue() : void |
||
| 18 | { |
||
| 19 | if (! $this->_em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
||
| 20 | $this->markTestSkipped('Platform does not support foreign keys.'); |
||
| 21 | } |
||
| 22 | |||
| 23 | $card = new Table('GH7684_identity_test'); |
||
| 24 | $card->addColumn('id', 'integer'); |
||
| 25 | $card->setPrimaryKey(['id']); |
||
| 26 | |||
| 27 | $translation = new Table('GH7684_identity_test_assoc'); |
||
| 28 | $translation->addColumn('id', 'integer'); |
||
| 29 | $translation->addColumn('gh7684_identity_test_id', 'integer'); |
||
| 30 | $translation->setPrimaryKey(['id']); |
||
| 31 | $translation->addForeignKeyConstraint('GH7684_identity_test', ['gh7684_identity_test_id'], ['id']); |
||
| 32 | |||
| 33 | $metadatas = $this->convertToClassMetadata([$card, $translation]); |
||
| 34 | |||
| 35 | $this->assertNotNull($metadatas['Gh7684IdentityTest'] ?? null); |
||
| 36 | $this->assertNotNull($metadatas['Gh7684IdentityTestAssoc'] ?? null); |
||
| 37 | |||
| 38 | $metadata = $metadatas['Gh7684IdentityTestAssoc']; |
||
| 39 | |||
| 40 | $metadata->getAssociationMapping('gh7684IdentityTest'); |
||
| 41 | } |
||
| 43 |