|
@@ 1121-1129 (lines=9) @@
|
| 1118 |
|
* @see \eZ\Publish\API\Repository\RoleService::addPolicy() |
| 1119 |
|
* @depends eZ\Publish\API\Repository\Tests\RoleServiceTest::testAddPolicyUpdatesRole |
| 1120 |
|
*/ |
| 1121 |
|
public function testAddPolicySetsPolicyProperties($roleAndPolicy) |
| 1122 |
|
{ |
| 1123 |
|
list($role, $policy) = $roleAndPolicy; |
| 1124 |
|
|
| 1125 |
|
$this->assertEquals( |
| 1126 |
|
array($role->id, 'content', 'create'), |
| 1127 |
|
array($policy->roleId, $policy->module, $policy->function) |
| 1128 |
|
); |
| 1129 |
|
} |
| 1130 |
|
|
| 1131 |
|
/** |
| 1132 |
|
* Test for the addPolicyByRoleDraft() method. |
|
@@ 1139-1147 (lines=9) @@
|
| 1136 |
|
* @see \eZ\Publish\API\Repository\RoleService::addPolicyByRoleDraft() |
| 1137 |
|
* @depends eZ\Publish\API\Repository\Tests\RoleServiceTest::testAddPolicyByRoleDraftUpdatesRole |
| 1138 |
|
*/ |
| 1139 |
|
public function testAddPolicyByRoleDraftSetsPolicyProperties($roleAndPolicy) |
| 1140 |
|
{ |
| 1141 |
|
list($role, $policy) = $roleAndPolicy; |
| 1142 |
|
|
| 1143 |
|
$this->assertEquals( |
| 1144 |
|
array($role->id, 'content', 'create'), |
| 1145 |
|
array($policy->roleId, $policy->module, $policy->function) |
| 1146 |
|
); |
| 1147 |
|
} |
| 1148 |
|
|
| 1149 |
|
/** |
| 1150 |
|
* Test for the addPolicy() method. |