File
- drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php, line 100
Class
- CallbackValidatorTest
Namespace
Symfony\Component\Validator\Tests\Constraints
Code
public function testCallbackMultipleMethods() {
$object = new CallbackValidatorTest_Object();
$this->context
->expects($this
->at(0))
->method('addViolation')
->with('My message', array(
'{{ value }}' => 'foobar',
));
$this->context
->expects($this
->at(1))
->method('addViolation')
->with('Other message', array(
'{{ value }}' => 'baz',
));
$this->validator
->validate($object, new Callback(array(
'validateOne',
'validateTwo',
)));
}