use Symfony\Component\Validator\Constraints\Valid;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Mapping\Loader\AttributeLoader;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class ValidTest extends TestCase
{ public function testGroupsCanBeSet() { $constraint =
new Valid(['groups' => 'foo'
]);
$this->
assertSame(['foo'
],
$constraint->groups
);
} public function testGroupsAreNullByDefault() { $constraint =
new Valid();
$this->
assertNull($constraint->groups
);
}