public function LegacyExecutionContextTest::testAddViolationAtUsesPreconfiguredValueIfNotPassed in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Tests/LegacyExecutionContextTest.php \Symfony\Component\Validator\Tests\LegacyExecutionContextTest::testAddViolationAtUsesPreconfiguredValueIfNotPassed()
File
- vendor/
symfony/ validator/ Tests/ LegacyExecutionContextTest.php, line 192
Class
- LegacyExecutionContextTest
- @group legacy
Namespace
Symfony\Component\Validator\TestsCode
public function testAddViolationAtUsesPreconfiguredValueIfNotPassed() {
$this->translator
->expects($this
->once())
->method('trans')
->with('Error', array())
->will($this
->returnValue('Translated error'));
$this->context
->addViolationAt('bam.baz', 'Error');
$this
->assertEquals(new ConstraintViolationList(array(
new ConstraintViolation('Translated error', 'Error', array(), 'Root', 'foo.bar.bam.baz', 'currentValue'),
)), $this->context
->getViolations());
}