|
@@ 976-981 (lines=6) @@
|
| 973 |
|
/* END: Use Case */ |
| 974 |
|
|
| 975 |
|
$actual = []; |
| 976 |
|
foreach ($roleDraft->getPolicies() as $policy) { |
| 977 |
|
$actual[] = [ |
| 978 |
|
'module' => $policy->module, |
| 979 |
|
'function' => $policy->function, |
| 980 |
|
]; |
| 981 |
|
} |
| 982 |
|
usort( |
| 983 |
|
$actual, |
| 984 |
|
function ($p1, $p2) { |
|
@@ 1142-1144 (lines=3) @@
|
| 1139 |
|
$role = $roleService->loadRole($roleDraft->id); |
| 1140 |
|
|
| 1141 |
|
$policies = []; |
| 1142 |
|
foreach ($role->getPolicies() as $policy) { |
| 1143 |
|
$policies[] = ['module' => $policy->module, 'function' => $policy->function]; |
| 1144 |
|
} |
| 1145 |
|
/* END: Use Case */ |
| 1146 |
|
array_multisort($policies); |
| 1147 |
|
|
|
@@ 1200-1202 (lines=3) @@
|
| 1197 |
|
$roleDraft = $roleService->createRole($roleCreate); |
| 1198 |
|
|
| 1199 |
|
$policies = []; |
| 1200 |
|
foreach ($roleDraft->getPolicies() as $policy) { |
| 1201 |
|
$policies[] = ['module' => $policy->module, 'function' => $policy->function]; |
| 1202 |
|
} |
| 1203 |
|
/* END: Use Case */ |
| 1204 |
|
|
| 1205 |
|
$this->assertEquals( |