use Symfony\Component\Validator\Tests\Fixtures\ConstraintB;
use Symfony\Component\Validator\Tests\Fixtures\ConstraintC;
use Symfony\Component\Validator\Tests\Fixtures\ConstraintWithStaticProperty;
use Symfony\Component\Validator\Tests\Fixtures\ConstraintWithTypedProperty;
use Symfony\Component\Validator\Tests\Fixtures\ConstraintWithValue;
use Symfony\Component\Validator\Tests\Fixtures\ConstraintWithValueAsDefault;
class ConstraintTest extends TestCase
{ public function testSetProperties() { $constraint =
new ConstraintA([ 'property1' => 'foo',
'property2' => 'bar',
]);
$this->
assertEquals('foo',
$constraint->property1
);
$this->
assertEquals('bar',
$constraint->property2
);
} public function testSetNotExistingPropertyThrowsException() { $this->
expectException(InvalidOptionsException::
class);