ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\ResourceStorage\Revision\StakeholderRepositoryTests Class Reference

Class StakeholderRepositoryTests. More...

+ Inheritance diagram for ILIAS\ResourceStorage\Revision\StakeholderRepositoryTests:
+ Collaboration diagram for ILIAS\ResourceStorage\Revision\StakeholderRepositoryTests:

Public Member Functions

 __construct ()
 
 testIdTooLong ()
 
 testNameTooLong ()
 
- Public Member Functions inherited from ILIAS\ResourceStorage\AbstractTestBase
 getDummyStream ()
 

Protected Member Functions

 setUp ()
 @inheritDoc More...
 
- Protected Member Functions inherited from ILIAS\ResourceStorage\AbstractTestBase
 setUp ()
 @inheritDoc More...
 
 getDummyUploadResult (string $file_name, string $mime_type, int $size)
 
 getDummyFileRevision (ResourceIdentification $id)
 

Protected Attributes

StakeholderDBRepository $stakeholder_repository
 
ResourceIdentification $identification
 
- Protected Attributes inherited from ILIAS\ResourceStorage\AbstractTestBase
DummyIDGenerator $id_generator
 
MockObject $db_mock
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ResourceStorage\Revision\StakeholderRepositoryTests::__construct ( )

Definition at line 34 of file StakeholderRepositoryTests.php.

35 {
36 parent::__construct(static::class);
37 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ setUp()

ILIAS\ResourceStorage\Revision\StakeholderRepositoryTests::setUp ( )
protected

@inheritDoc

Reimplemented from ILIAS\ResourceStorage\AbstractTestBase.

Definition at line 42 of file StakeholderRepositoryTests.php.

42 : void
43 {
44 parent::setUp();
45 $this->stakeholder_repository = new StakeholderDBRepository($this->db_mock);
46 $this->identification = new ResourceIdentification('test_identification');
47 }

◆ testIdTooLong()

ILIAS\ResourceStorage\Revision\StakeholderRepositoryTests::testIdTooLong ( )

Definition at line 49 of file StakeholderRepositoryTests.php.

49 : void
50 {
51 $this->expectException(\InvalidArgumentException::class);
52 $this->expectExceptionMessage('stakeholder ids MUST be shorter or equal to than 64 characters');
53 $stakeholder = $this->getResourceStakeholder(
54 str_repeat('A', 65)
55 );
56 $this->stakeholder_repository->register($this->identification, $stakeholder);
57 }

◆ testNameTooLong()

ILIAS\ResourceStorage\Revision\StakeholderRepositoryTests::testNameTooLong ( )

Definition at line 59 of file StakeholderRepositoryTests.php.

59 : void
60 {
61 $this->expectException(\InvalidArgumentException::class);
62 $this->expectExceptionMessage('stakeholder classnames MUST be shorter or equal to than 250 characters');
63 $stakeholder = $this->getResourceStakeholder(
64 str_repeat('A', 64),
65 str_repeat('B', 251)
66 );
67 $this->stakeholder_repository->register($this->identification, $stakeholder);
68 }

Field Documentation

◆ $identification

ResourceIdentification ILIAS\ResourceStorage\Revision\StakeholderRepositoryTests::$identification
protected

Definition at line 39 of file StakeholderRepositoryTests.php.

◆ $stakeholder_repository

StakeholderDBRepository ILIAS\ResourceStorage\Revision\StakeholderRepositoryTests::$stakeholder_repository
protected

Definition at line 38 of file StakeholderRepositoryTests.php.


The documentation for this class was generated from the following file: