eZ/Publish/Core/Repository/Tests/Service/Mock/PermissionTest.php 1 location
|
@@ 1096-1107 (lines=12) @@
|
| 1093 |
|
/** |
| 1094 |
|
* @return \eZ\Publish\Core\Repository\Helper\RoleDomainMapper|\PHPUnit\Framework\MockObject\MockObject |
| 1095 |
|
*/ |
| 1096 |
|
protected function getRoleDomainMapperMock($methods = []) |
| 1097 |
|
{ |
| 1098 |
|
if ($this->roleDomainMapperMock === null) { |
| 1099 |
|
$this->roleDomainMapperMock = $this |
| 1100 |
|
->getMockBuilder(RoleDomainMapper::class) |
| 1101 |
|
->setMethods($methods) |
| 1102 |
|
->disableOriginalConstructor() |
| 1103 |
|
->getMock(); |
| 1104 |
|
} |
| 1105 |
|
|
| 1106 |
|
return $this->roleDomainMapperMock; |
| 1107 |
|
} |
| 1108 |
|
} |
| 1109 |
|
|
eZ/Publish/Core/Repository/Tests/Permission/PermissionCriterionResolverTest.php 1 location
|
@@ 385-397 (lines=13) @@
|
| 382 |
|
|
| 383 |
|
protected $limitationServiceMock; |
| 384 |
|
|
| 385 |
|
protected function getLimitationServiceMock($methods = []) |
| 386 |
|
{ |
| 387 |
|
// Tests first calls here with methods set before initiating PermissionCriterionResolver with same instance. |
| 388 |
|
if ($this->limitationServiceMock !== null) { |
| 389 |
|
return $this->limitationServiceMock; |
| 390 |
|
} |
| 391 |
|
|
| 392 |
|
return $this->limitationServiceMock = $this |
| 393 |
|
->getMockBuilder(LimitationService::class) |
| 394 |
|
->setMethods($methods) |
| 395 |
|
->disableOriginalConstructor() |
| 396 |
|
->getMock(); |
| 397 |
|
} |
| 398 |
|
} |
| 399 |
|
|