use Symfony\Component\Validator\Constraints\IdenticalTo;
use Symfony\Component\Validator\Constraints\IdenticalToValidator;
-use Symfony\Component\Validator\Validation;
/**
* @author Daniel Holmes <daniel@danielholmes.org>
*/
class IdenticalToValidatorTest extends AbstractComparisonValidatorTestCase
{
- protected function getApiVersion()
- {
- return Validation::API_VERSION_2_5;
- }
-
protected function createValidator()
{
return new IdenticalToValidator();
}
- protected function createConstraint(array $options)
+ protected function createConstraint(array $options = null)
{
return new IdenticalTo($options);
}
array(null, 1),
);
- if (PHP_VERSION_ID >= 50500) {
- $immutableDate = new \DateTimeImmutable('2000-01-01');
- $comparisons[] = array($immutableDate, $immutableDate);
- }
+ $immutableDate = new \DateTimeImmutable('2000-01-01');
+ $comparisons[] = array($immutableDate, $immutableDate);
return $comparisons;
}
+ /**
+ * {@inheritdoc}
+ */
+ public function provideValidComparisonsToPropertyPath()
+ {
+ return array(
+ array(5),
+ );
+ }
+
/**
* {@inheritdoc}
*/