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

View File

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

View File

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