eZ/Publish/Core/Repository/Tests/Service/Mock/PermissionsCriterionHandlerTest.php 1 location
|
@@ 439-450 (lines=12) @@
|
| 436 |
|
|
| 437 |
|
protected $limitationServiceMock; |
| 438 |
|
|
| 439 |
|
protected function getLimitationServiceMock($methods = []) |
| 440 |
|
{ |
| 441 |
|
if ($this->limitationServiceMock === null) { |
| 442 |
|
$this->limitationServiceMock = $this |
| 443 |
|
->getMockBuilder('eZ\Publish\Core\Repository\Helper\LimitationService') |
| 444 |
|
->setMethods($methods) |
| 445 |
|
->disableOriginalConstructor() |
| 446 |
|
->getMock(); |
| 447 |
|
} |
| 448 |
|
|
| 449 |
|
return $this->limitationServiceMock; |
| 450 |
|
} |
| 451 |
|
} |
| 452 |
|
|
eZ/Publish/Core/Repository/Tests/Permission/PermissionCriterionResolverTest.php 1 location
|
@@ 372-384 (lines=13) @@
|
| 369 |
|
|
| 370 |
|
protected $limitationServiceMock; |
| 371 |
|
|
| 372 |
|
protected function getLimitationServiceMock($methods = []) |
| 373 |
|
{ |
| 374 |
|
// Tests first calls here with methods set before initiating PermissionCriterionResolver with same instance. |
| 375 |
|
if ($this->limitationServiceMock !== null) { |
| 376 |
|
return $this->limitationServiceMock; |
| 377 |
|
} |
| 378 |
|
|
| 379 |
|
return $this->limitationServiceMock = $this |
| 380 |
|
->getMockBuilder(LimitationService::class) |
| 381 |
|
->setMethods($methods) |
| 382 |
|
->disableOriginalConstructor() |
| 383 |
|
->getMock(); |
| 384 |
|
} |
| 385 |
|
} |
| 386 |
|
|
eZ/Publish/Core/Repository/Tests/Service/Mock/PermissionTest.php 1 location
|
@@ 1017-1028 (lines=12) @@
|
| 1014 |
|
/** |
| 1015 |
|
* @return \eZ\Publish\Core\Repository\Helper\LimitationService|\PHPUnit_Framework_MockObject_MockObject |
| 1016 |
|
*/ |
| 1017 |
|
protected function getLimitationServiceMock($methods = []) |
| 1018 |
|
{ |
| 1019 |
|
if ($this->limitationServiceMock === null) { |
| 1020 |
|
$this->limitationServiceMock = $this |
| 1021 |
|
->getMockBuilder('eZ\\Publish\\Core\\Repository\\Helper\\LimitationService') |
| 1022 |
|
->setMethods($methods) |
| 1023 |
|
->disableOriginalConstructor() |
| 1024 |
|
->getMock(); |
| 1025 |
|
} |
| 1026 |
|
|
| 1027 |
|
return $this->limitationServiceMock; |
| 1028 |
|
} |
| 1029 |
|
} |
| 1030 |
|
|