mirror of
https://github.com/shlinkio/shlink.git
synced 2026-02-28 04:03:12 +08:00
Improve RoleResolver coverage
This commit is contained in:
@@ -91,11 +91,17 @@ class RoleResolverTest extends TestCase
|
||||
[RoleDefinition::forAuthoredShortUrls()],
|
||||
0,
|
||||
];
|
||||
yield 'both roles' => [
|
||||
$buildInput(
|
||||
[Role::DOMAIN_SPECIFIC->paramName() => 'example.com', Role::AUTHORED_SHORT_URLS->paramName() => true],
|
||||
),
|
||||
[RoleDefinition::forAuthoredShortUrls(), RoleDefinition::forDomain($domain)],
|
||||
yield 'all roles' => [
|
||||
$buildInput([
|
||||
Role::DOMAIN_SPECIFIC->paramName() => 'example.com',
|
||||
Role::AUTHORED_SHORT_URLS->paramName() => true,
|
||||
Role::NO_ORPHAN_VISITS->paramName() => true,
|
||||
]),
|
||||
[
|
||||
RoleDefinition::forAuthoredShortUrls(),
|
||||
RoleDefinition::forDomain($domain),
|
||||
RoleDefinition::forNoOrphanVisits(),
|
||||
],
|
||||
1,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user