|
@@ 1112-1117 (lines=6) @@
|
| 1109 |
|
/* END: Use Case */ |
| 1110 |
|
|
| 1111 |
|
$actual = []; |
| 1112 |
|
foreach ($roleDraft->getPolicies() as $policy) { |
| 1113 |
|
$actual[] = [ |
| 1114 |
|
'module' => $policy->module, |
| 1115 |
|
'function' => $policy->function, |
| 1116 |
|
]; |
| 1117 |
|
} |
| 1118 |
|
usort( |
| 1119 |
|
$actual, |
| 1120 |
|
function ($p1, $p2) { |
|
@@ 1278-1280 (lines=3) @@
|
| 1275 |
|
$role = $roleService->loadRole($roleDraft->id); |
| 1276 |
|
|
| 1277 |
|
$policies = []; |
| 1278 |
|
foreach ($role->getPolicies() as $policy) { |
| 1279 |
|
$policies[] = ['module' => $policy->module, 'function' => $policy->function]; |
| 1280 |
|
} |
| 1281 |
|
/* END: Use Case */ |
| 1282 |
|
array_multisort($policies); |
| 1283 |
|
|
|
@@ 1336-1338 (lines=3) @@
|
| 1333 |
|
$roleDraft = $roleService->createRole($roleCreate); |
| 1334 |
|
|
| 1335 |
|
$policies = []; |
| 1336 |
|
foreach ($roleDraft->getPolicies() as $policy) { |
| 1337 |
|
$policies[] = ['module' => $policy->module, 'function' => $policy->function]; |
| 1338 |
|
} |
| 1339 |
|
/* END: Use Case */ |
| 1340 |
|
|
| 1341 |
|
$this->assertEquals( |