You are here

public function ChoiceValidatorTest::testValidChoiceCallbackFunction in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/validator/Tests/Constraints/ChoiceValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\ChoiceValidatorTest::testValidChoiceCallbackFunction()

File

vendor/symfony/validator/Tests/Constraints/ChoiceValidatorTest.php, line 85

Class

ChoiceValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testValidChoiceCallbackFunction() {
  $constraint = new Choice(array(
    'callback' => __NAMESPACE__ . '\\choice_callback',
  ));
  $this->validator
    ->validate('bar', $constraint);
  $this
    ->assertNoViolation();
}