Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
CallbackValidatorTest_Object example
public
function
testNullIsValid
(
)
{
$this
->validator->
validate
(
null,
new
Callback
(
)
)
;
$this
->
assertNoViolation
(
)
;
}
public
function
testSingleMethod
(
)
{
$object
=
new
CallbackValidatorTest_Object
(
)
;
$constraint
=
new
Callback
(
'validate'
)
;
$this
->validator->
validate
(
$object
,
$constraint
)
;
$this
->
buildViolation
(
'My message'
)
->
setParameter
(
'{{ value }}', 'foobar'
)
->
assertRaised
(
)
;
}
public
function
testSingleMethodExplicitName
(
)
{