|
@@ 1215-1223 (lines=9) @@
|
| 1212 |
|
* @see \eZ\Publish\API\Repository\RoleService::addPolicy() |
| 1213 |
|
* @depends eZ\Publish\API\Repository\Tests\RoleServiceTest::testAddPolicyUpdatesRole |
| 1214 |
|
*/ |
| 1215 |
|
public function testAddPolicySetsPolicyProperties($roleAndPolicy) |
| 1216 |
|
{ |
| 1217 |
|
list($role, $policy) = $roleAndPolicy; |
| 1218 |
|
|
| 1219 |
|
$this->assertEquals( |
| 1220 |
|
array($role->id, 'content', 'create'), |
| 1221 |
|
array($policy->roleId, $policy->module, $policy->function) |
| 1222 |
|
); |
| 1223 |
|
} |
| 1224 |
|
|
| 1225 |
|
/** |
| 1226 |
|
* Test for the addPolicyByRoleDraft() method. |
|
@@ 1233-1241 (lines=9) @@
|
| 1230 |
|
* @see \eZ\Publish\API\Repository\RoleService::addPolicyByRoleDraft() |
| 1231 |
|
* @depends eZ\Publish\API\Repository\Tests\RoleServiceTest::testAddPolicyByRoleDraftUpdatesRole |
| 1232 |
|
*/ |
| 1233 |
|
public function testAddPolicyByRoleDraftSetsPolicyProperties($roleAndPolicy) |
| 1234 |
|
{ |
| 1235 |
|
list($role, $policy) = $roleAndPolicy; |
| 1236 |
|
|
| 1237 |
|
$this->assertEquals( |
| 1238 |
|
array($role->id, 'content', 'create'), |
| 1239 |
|
array($policy->roleId, $policy->module, $policy->function) |
| 1240 |
|
); |
| 1241 |
|
} |
| 1242 |
|
|
| 1243 |
|
/** |
| 1244 |
|
* Test for the addPolicy() method. |