You are here

public function LegacyExecutionContextTest::testAddViolationPluralTranslationError in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/LegacyExecutionContextTest.php, line 251

Class

LegacyExecutionContextTest
@group legacy

Namespace

Symfony\Component\Validator\Tests

Code

public function testAddViolationPluralTranslationError() {
  $this->translator
    ->expects($this
    ->once())
    ->method('transChoice')
    ->with('foo')
    ->will($this
    ->throwException(new \InvalidArgumentException()));
  $this->translator
    ->expects($this
    ->once())
    ->method('trans')
    ->with('foo');
  $this->context
    ->addViolation('foo', array(), null, 2);
}