'groups' => 'MyGroup',
]);
$constraint =
unserialize(serialize($constraint));
$this->
assertSame(['MyGroup'
],
$constraint->groups
);
} public function testGetErrorNameForUnknownCode() { $this->
expectException(InvalidArgumentException::
class);
Constraint::
getErrorName(1
);
} public function testOptionsAsDefaultOption() { $constraint =
new ConstraintA($options =
['value1'
]);
$this->
assertEquals($options,
$constraint->property2
);
$constraint =
new ConstraintA($options =
['value1', 'property1' => 'value2'
]);
$this->
assertEquals($options,
$constraint->property2
);
}