refactor(security): type firewall rule lifecycle events
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -102,7 +102,9 @@ class FirewallRuleServicesTest extends TestCase
|
||||
->with(self::callback(static fn(FirewallRuleObject $rule): bool =>
|
||||
$rule->isTenantScoped() && $rule->getTenantId() === 'tenant-a'
|
||||
))
|
||||
->willReturnArgument(0);
|
||||
->willReturnCallback(static fn(FirewallRuleObject $rule): FirewallRuleObject =>
|
||||
$rule->setId('tenant-rule')
|
||||
);
|
||||
|
||||
$this->tenantService()->blockIp('203.0.113.10');
|
||||
}
|
||||
@@ -117,7 +119,9 @@ class FirewallRuleServicesTest extends TestCase
|
||||
->with(self::callback(static fn(FirewallRuleObject $rule): bool =>
|
||||
$rule->isSystemScoped() && $rule->getTenantId() === null
|
||||
))
|
||||
->willReturnArgument(0);
|
||||
->willReturnCallback(static fn(FirewallRuleObject $rule): FirewallRuleObject =>
|
||||
$rule->setId('system-rule')
|
||||
);
|
||||
|
||||
$this->systemService()->blockIp('203.0.113.10');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user