You are here

public function CurrencyValidatorTest::testInvalidCurrencies in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Constraints/CurrencyValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\CurrencyValidatorTest::testInvalidCurrencies()

@dataProvider getInvalidCurrencies

File

vendor/symfony/validator/Tests/Constraints/CurrencyValidatorTest.php, line 91

Class

CurrencyValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testInvalidCurrencies($currency) {
  $constraint = new Currency(array(
    'message' => 'myMessage',
  ));
  $this->validator
    ->validate($currency, $constraint);
  $this
    ->buildViolation('myMessage')
    ->setParameter('{{ value }}', '"' . $currency . '"')
    ->assertRaised();
}