Skip to content

Commit a4cdee6

Browse files
committed
Add Doctrine.Tests.ORM.Mapping.ReservedWordInTableColumn.php
1 parent e8d7299 commit a4cdee6

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1122,9 +1122,9 @@ public function testDiscriminatorColumnDefaultName(): void
11221122

11231123
public function testReservedWordInTableColumn(): void
11241124
{
1125-
$this->createClassMetadata(ReservedWordInTableColumn::class);
1125+
$metadata = $this->createClassMetadata(ReservedWordInTableColumn::class);
11261126

1127-
// @todo: add some assertions.
1127+
self::assertContains('`count`', $metadata->getColumnNames());
11281128
}
11291129
}
11301130

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
$metadata->mapField(
6+
[
7+
'id' => true,
8+
'fieldName' => 'id',
9+
'type' => 'integer',
10+
]
11+
);
12+
$metadata->mapField(
13+
[
14+
'fieldName' => 'count',
15+
'type' => 'integer',
16+
'columnName' => '`count`',
17+
]
18+
);

0 commit comments

Comments
 (0)