|
@@ 292-303 (lines=12) @@
|
| 289 |
|
self::assertInstanceOf('\\eZ\\Publish\\API\\Repository\\Values\\User\\Limitation', $limitation); |
| 290 |
|
|
| 291 |
|
if ($policy->module == 'content' && $policy->function == 'read') { |
| 292 |
|
switch ($limitation->getIdentifier()) { |
| 293 |
|
case Limitation::CONTENTTYPE: |
| 294 |
|
self::assertEquals($limitation1->limitationValues, $limitation->limitationValues); |
| 295 |
|
break; |
| 296 |
|
|
| 297 |
|
case Limitation::SECTION: |
| 298 |
|
self::assertEquals($limitation2->limitationValues, $limitation->limitationValues); |
| 299 |
|
break; |
| 300 |
|
|
| 301 |
|
default: |
| 302 |
|
self::fail('Created role contains limitations not defined with create struct'); |
| 303 |
|
} |
| 304 |
|
} elseif ($policy->module == 'content' && $policy->function == 'edit') { |
| 305 |
|
switch ($limitation->getIdentifier()) { |
| 306 |
|
case Limitation::OWNER: |
|
@@ 305-316 (lines=12) @@
|
| 302 |
|
self::fail('Created role contains limitations not defined with create struct'); |
| 303 |
|
} |
| 304 |
|
} elseif ($policy->module == 'content' && $policy->function == 'edit') { |
| 305 |
|
switch ($limitation->getIdentifier()) { |
| 306 |
|
case Limitation::OWNER: |
| 307 |
|
self::assertEquals($limitation3->limitationValues, $limitation->limitationValues); |
| 308 |
|
break; |
| 309 |
|
|
| 310 |
|
case Limitation::USERGROUP: |
| 311 |
|
self::assertEquals($limitation4->limitationValues, $limitation->limitationValues); |
| 312 |
|
break; |
| 313 |
|
|
| 314 |
|
default: |
| 315 |
|
self::fail('Created role contains limitations not defined with create struct'); |
| 316 |
|
} |
| 317 |
|
} else { |
| 318 |
|
self::fail('Created role contains policy not defined with create struct'); |
| 319 |
|
} |