|
@@ 1160-1165 (lines=6) @@
|
| 1157 |
|
/* END: Use Case */ |
| 1158 |
|
|
| 1159 |
|
$actual = []; |
| 1160 |
|
foreach ($roleDraft->getPolicies() as $policy) { |
| 1161 |
|
$actual[] = [ |
| 1162 |
|
'module' => $policy->module, |
| 1163 |
|
'function' => $policy->function, |
| 1164 |
|
]; |
| 1165 |
|
} |
| 1166 |
|
usort( |
| 1167 |
|
$actual, |
| 1168 |
|
function ($p1, $p2) { |
|
@@ 1326-1328 (lines=3) @@
|
| 1323 |
|
$role = $roleService->loadRole($roleDraft->id); |
| 1324 |
|
|
| 1325 |
|
$policies = []; |
| 1326 |
|
foreach ($role->getPolicies() as $policy) { |
| 1327 |
|
$policies[] = ['module' => $policy->module, 'function' => $policy->function]; |
| 1328 |
|
} |
| 1329 |
|
/* END: Use Case */ |
| 1330 |
|
array_multisort($policies); |
| 1331 |
|
|
|
@@ 1384-1386 (lines=3) @@
|
| 1381 |
|
$roleDraft = $roleService->createRole($roleCreate); |
| 1382 |
|
|
| 1383 |
|
$policies = []; |
| 1384 |
|
foreach ($roleDraft->getPolicies() as $policy) { |
| 1385 |
|
$policies[] = ['module' => $policy->module, 'function' => $policy->function]; |
| 1386 |
|
} |
| 1387 |
|
/* END: Use Case */ |
| 1388 |
|
|
| 1389 |
|
$this->assertEquals( |