use Symfony\Component\Intl\Util\IntlTestHelper;
use Symfony\Component\Validator\Constraints\Range;
use Symfony\Component\Validator\Constraints\RangeValidator;
-use Symfony\Component\Validator\Validation;
+use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
-class RangeValidatorTest extends AbstractConstraintValidatorTest
+class RangeValidatorTest extends ConstraintValidatorTestCase
{
- protected function getApiVersion()
- {
- return Validation::API_VERSION_2_5;
- }
-
protected function createValidator()
{
return new RangeValidator();
array(new \DateTime('March 20, 2014')),
);
- if (\PHP_VERSION_ID >= 50500) {
- $tests[] = array(new \DateTimeImmutable('March 10, 2014'));
- $tests[] = array(new \DateTimeImmutable('March 15, 2014'));
- $tests[] = array(new \DateTimeImmutable('March 20, 2014'));
- }
+ $tests[] = array(new \DateTimeImmutable('March 10, 2014'));
+ $tests[] = array(new \DateTimeImmutable('March 15, 2014'));
+ $tests[] = array(new \DateTimeImmutable('March 20, 2014'));
$this->restoreDefaultTimezone();
array(new \DateTime('March 9, 2014'), 'Mar 9, 2014, 12:00 AM'),
);
- if (\PHP_VERSION_ID >= 50500) {
- $tests[] = array(new \DateTimeImmutable('March 20, 2013'), 'Mar 20, 2013, 12:00 AM');
- $tests[] = array(new \DateTimeImmutable('March 9, 2014'), 'Mar 9, 2014, 12:00 AM');
- }
+ $tests[] = array(new \DateTimeImmutable('March 20, 2013'), 'Mar 20, 2013, 12:00 AM');
+ $tests[] = array(new \DateTimeImmutable('March 9, 2014'), 'Mar 9, 2014, 12:00 AM');
$this->restoreDefaultTimezone();
array(new \DateTime('March 9, 2015'), 'Mar 9, 2015, 12:00 AM'),
);
- if (\PHP_VERSION_ID >= 50500) {
- $tests[] = array(new \DateTimeImmutable('March 21, 2014'), 'Mar 21, 2014, 12:00 AM');
- $tests[] = array(new \DateTimeImmutable('March 9, 2015'), 'Mar 9, 2015, 12:00 AM');
- }
+ $tests[] = array(new \DateTimeImmutable('March 21, 2014'), 'Mar 21, 2014, 12:00 AM');
+ $tests[] = array(new \DateTimeImmutable('March 9, 2015'), 'Mar 9, 2015, 12:00 AM');
$this->restoreDefaultTimezone();