You are here

public function ChoiceValidatorTest::testValidChoiceCallbackStaticMethod 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::testValidChoiceCallbackStaticMethod()

File

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

Class

ChoiceValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testValidChoiceCallbackStaticMethod() {
  $constraint = new Choice(array(
    'callback' => array(
      __CLASS__,
      'staticCallback',
    ),
  ));
  $this->validator
    ->validate('bar', $constraint);
  $this
    ->assertNoViolation();
}