use PHPUnit\Framework\TestCase;
use Symfony\Component\Validator\Constraints\Range;
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
use Symfony\Component\Validator\Exception\MissingOptionsException;
class RangeTest extends TestCase
{ public function testThrowsConstraintExceptionIfBothMinLimitAndPropertyPath() { $this->
expectException(ConstraintDefinitionException::
class);
$this->
expectExceptionMessage('requires only one of the "min" or "minPropertyPath" options to be set, not both.'
);
new Range([ 'min' => 'min',
'minPropertyPath' => 'minPropertyPath',
]);
} public function testThrowsConstraintExceptionIfBothMinLimitAndPropertyPathNamed() { $this->
expectException(\Symfony\Component\Validator\Exception\ConstraintDefinitionException::
class);
$this->
expectExceptionMessage('requires only one of the "min" or "minPropertyPath" options to be set, not both.'
);
new Range(min: 'min', minPropertyPath: 'minPropertyPath'
);
}