Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
UniqueEntityValidator example
$classMetadata
->reflFields =
[
'name' =>
$refl
]
;
$em
->
expects
(
$this
->
any
(
)
)
->
method
(
'getClassMetadata'
)
->
willReturn
(
$classMetadata
)
;
return
$em
;
}
protected
function
createValidator
(
)
: UniqueEntityValidator
{
return
new
UniqueEntityValidator
(
$this
->registry
)
;
}
private
function
createSchema
(
$em
)
{
$schemaTool
=
new
SchemaTool
(
$em
)
;
$schemaTool
->
createSchema
(
[
$em
->
getClassMetadata
(
SingleIntIdEntity::
class
)
,
$em
->
getClassMetadata
(
SingleIntIdNoToStringEntity::
class
)
,
$em
->
getClassMetadata
(
DoubleNameEntity::
class
)
,
$em
->
getClassMetadata
(
DoubleNullableNameEntity::
class
)
,
$em
->
getClassMetadata
(
CompositeIntIdEntity::
class
)
,