private EntityRepository
$conditionRepository;
private Context
$context;
private EmailRule
$rule;
protected function setUp(): void
{ $this->ruleRepository =
$this->
getContainer()->
get('rule.repository'
);
$this->conditionRepository =
$this->
getContainer()->
get('rule_condition.repository'
);
$this->context = Context::
createDefaultContext();
$this->rule =
new EmailRule();
} public function testValidateWithMissingEmail(): void
{ try { $this->conditionRepository->
create([ [ 'type'
=> (new EmailRule())->
getName(),
'ruleId' => Uuid::
randomHex(),
],
],
$this->context
);