failing test for issue 38861

This commit is contained in:
Bart Wach 2020-10-29 21:30:43 +01:00 committed by Nicolas Grekas
parent 4c36145664
commit f9a0e000e9
3 changed files with 20 additions and 0 deletions

View File

@ -78,6 +78,7 @@ class DoctrineExtractorTest extends TestCase
'indexedBaz',
'indexedByDt',
'indexedByCustomType',
'indexedBuz',
]);
$this->assertEquals(
@ -197,6 +198,14 @@ class DoctrineExtractorTest extends TestCase
new Type(Type::BUILTIN_TYPE_OBJECT, false, DoctrineRelation::class)
)]],
['indexedByCustomType', null],
['indexedBuz', [new Type(
Type::BUILTIN_TYPE_OBJECT,
false,
Collection::class,
true,
new Type(Type::BUILTIN_TYPE_STRING),
new Type(Type::BUILTIN_TYPE_OBJECT, false, DoctrineRelation::class)
)]],
];
if (class_exists(Types::class)) {

View File

@ -132,4 +132,9 @@ class DoctrineDummy
* @OneToMany(targetEntity="DoctrineRelation", mappedBy="customType", indexBy="customType")
*/
private $indexedByCustomType;
/**
* @OneToMany(targetEntity="DoctrineRelation", mappedBy="buzField", indexBy="buzField")
*/
protected $indexedBuz;
}

View File

@ -54,4 +54,10 @@ class DoctrineRelation
* @Column(type="foo")
*/
private $customType;
/**
* @Column(type="guid", name="different_than_field")
* @ManyToOne(targetEntity="DoctrineDummy", inversedBy="indexedBuz")
*/
protected $buzField;
}