4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Validator\Tests\Constraints;
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Validator\Constraints\Valid;
18 * @author Bernhard Schussek <bschussek@gmail.com>
20 class ValidTest extends TestCase
22 public function testGroupsCanBeSet()
24 $constraint = new Valid(array('groups' => 'foo'));
26 $this->assertSame(array('foo'), $constraint->groups);
29 public function testGroupsAreNullByDefault()
31 $constraint = new Valid();
33 $this->assertNull($constraint->groups);