Symfony\Component\Form\Tests\Extension\Validator\ValidatorTypeGuesserTest::testGuessRequired PHP Method

testGuessRequired() public method

public testGuessRequired ( $constraint, $guess )
    public function testGuessRequired($constraint, $guess)
    {
        // add distracting constraint
        $this->metadata->addPropertyConstraint(self::TEST_PROPERTY, new Email());

        // add constraint under test
        $this->metadata->addPropertyConstraint(self::TEST_PROPERTY, $constraint);

        $this->assertEquals($guess, $this->guesser->guessRequired(self::TEST_CLASS, self::TEST_PROPERTY));
    }