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