21require_once(__DIR__ .
"/../AbstractTestBase.php");
42 protected function setUp(): void
51 $this->expectException(\InvalidArgumentException::class);
52 $this->expectExceptionMessage(
'stakeholder ids MUST be shorter or equal to than 64 characters');
53 $stakeholder = $this->getResourceStakeholder(
56 $this->stakeholder_repository->register($this->identification, $stakeholder);
61 $this->expectException(\InvalidArgumentException::class);
62 $this->expectExceptionMessage(
'stakeholder classnames MUST be shorter or equal to than 250 characters');
63 $stakeholder = $this->getResourceStakeholder(
67 $this->stakeholder_repository->register($this->identification, $stakeholder);
70 protected function getResourceStakeholder(
71 ?
string $stakeholder_id =
null,
72 ?
string $stakeholder_classname =
null
78 protected string $stakeholder_id =
'the_ludicrous_long_identification_string_of_a_resource_stakeholder';
82 protected string $stakeholder_classname =
'This\Is\A\Very\Long\Class\Name\Which\Can\Not\Be\Handled\As\A\Propper\Stakeholder\In\The\ILIAS\Resource\Storage\Service';
84 public function __construct(?
string $stakeholder_id =
null, ?
string $stakeholder_classname =
null)
86 $this->stakeholder_id = $stakeholder_id ?? $this->stakeholder_id;
87 $this->stakeholder_classname = $stakeholder_classname ?? $this->stakeholder_classname;
90 public function getId(): string
92 return $this->stakeholder_id;
95 public function getConsumerNameForPresentation(): string
100 public function getFullyQualifiedClassName(): string
102 return $this->stakeholder_classname;
105 public function isResourceInUse(ResourceIdentification
$identification): bool
110 public function resourceHasBeenDeleted(ResourceIdentification
$identification): bool
120 public function getOwnerOfNewResources():
int
Class ResourceBuilderTest.
Class ResourceIdentification.
Class StakeholderRepositoryTests.
ResourceIdentification $identification
StakeholderDBRepository $stakeholder_repository
Interface StakeholderDBRepository.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ResourceStakeholder.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...