Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / validator / Tests / Constraints / TimeValidatorTest.php
index a6ca1435ed3385da8002a9b736c148965a75dfc6..a22251d0ee3c50f5c0b12b96b43b219e172c59b1 100644 (file)
@@ -13,15 +13,10 @@ namespace Symfony\Component\Validator\Tests\Constraints;
 
 use Symfony\Component\Validator\Constraints\Time;
 use Symfony\Component\Validator\Constraints\TimeValidator;
-use Symfony\Component\Validator\Validation;
+use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
 
-class TimeValidatorTest extends AbstractConstraintValidatorTest
+class TimeValidatorTest extends ConstraintValidatorTestCase
 {
-    protected function getApiVersion()
-    {
-        return Validation::API_VERSION_2_5;
-    }
-
     protected function createValidator()
     {
         return new TimeValidator();
@@ -104,4 +99,11 @@ class TimeValidatorTest extends AbstractConstraintValidatorTest
             array('00:00:60', Time::INVALID_TIME_ERROR),
         );
     }
+
+    public function testDateTimeImmutableIsValid()
+    {
+        $this->validator->validate(new \DateTimeImmutable(), new Time());
+
+        $this->assertNoViolation();
+    }
 }