Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
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 | $table1 = new Table('GH7684_identity_test_table'); |
||
24 | $table1->addColumn('id', 'integer'); |
||
25 | $table1->setPrimaryKey(['id']); |
||
26 | |||
27 | $table2 = new Table('GH7684_identity_test_assoc_table'); |
||
28 | $table2->addColumn('id', 'integer'); |
||
29 | $table2->addColumn('gh7684_identity_test_id', 'integer'); |
||
30 | $table2->setPrimaryKey(['id']); |
||
31 | $table2->addForeignKeyConstraint('GH7684_identity_test', ['gh7684_identity_test_id'], ['id']); |
||
32 | |||
33 | $metadatas = $this->convertToClassMetadata([$table1, $table2]); |
||
34 | $metadata = $metadatas['Gh7684IdentityTestAssocTable']; |
||
35 | |||
36 | $this->assertArrayHasKey('gh7684IdentityTest', $metadata->associationMappings); |
||
37 | } |
||
39 |