Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / validator / Tests / Constraints / ValidTest.php
index 83722fd2df0e0f48fee5481021d8e8c8b3e63503..9928bd82d022546eee9af6adb8586897054412b7 100644 (file)
@@ -19,11 +19,17 @@ use Symfony\Component\Validator\Constraints\Valid;
  */
 class ValidTest extends TestCase
 {
-    /**
-     * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException
-     */
-    public function testRejectGroupsOption()
+    public function testGroupsCanBeSet()
     {
-        new Valid(array('groups' => 'foo'));
+        $constraint = new Valid(array('groups' => 'foo'));
+
+        $this->assertSame(array('foo'), $constraint->groups);
+    }
+
+    public function testGroupsAreNullByDefault()
+    {
+        $constraint = new Valid();
+
+        $this->assertNull($constraint->groups);
     }
 }