|
@@ 1093-1098 (lines=6) @@
|
| 1090 |
|
/* END: Use Case */ |
| 1091 |
|
|
| 1092 |
|
$actual = []; |
| 1093 |
|
foreach ($roleDraft->getPolicies() as $policy) { |
| 1094 |
|
$actual[] = [ |
| 1095 |
|
'module' => $policy->module, |
| 1096 |
|
'function' => $policy->function, |
| 1097 |
|
]; |
| 1098 |
|
} |
| 1099 |
|
usort( |
| 1100 |
|
$actual, |
| 1101 |
|
function ($p1, $p2) { |
|
@@ 1360-1362 (lines=3) @@
|
| 1357 |
|
$role = $roleService->loadRole($roleDraft->id); |
| 1358 |
|
|
| 1359 |
|
$policies = []; |
| 1360 |
|
foreach ($role->getPolicies() as $policy) { |
| 1361 |
|
$policies[] = ['module' => $policy->module, 'function' => $policy->function]; |
| 1362 |
|
} |
| 1363 |
|
/* END: Use Case */ |
| 1364 |
|
array_multisort($policies); |
| 1365 |
|
|
|
@@ 1418-1420 (lines=3) @@
|
| 1415 |
|
$roleDraft = $roleService->createRole($roleCreate); |
| 1416 |
|
|
| 1417 |
|
$policies = []; |
| 1418 |
|
foreach ($roleDraft->getPolicies() as $policy) { |
| 1419 |
|
$policies[] = ['module' => $policy->module, 'function' => $policy->function]; |
| 1420 |
|
} |
| 1421 |
|
/* END: Use Case */ |
| 1422 |
|
|
| 1423 |
|
$this->assertEquals( |