ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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 ()
 
- Protected Member Functions inherited from ILIAS\ResourceStorage\AbstractTestBase
 setUp ()
 
 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.

References ILIAS\GlobalScreen\Provider\__construct().

Referenced by ILIAS\ResourceStorage\Revision\StakeholderRepositoryTests\testNameTooLong().

35  {
36  parent::__construct(static::class);
37  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ setUp()

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

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.

References ILIAS\ResourceStorage\Revision\StakeholderRepositoryTests\__construct(), ILIAS\Survey\Mode\getId(), and null.

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  }
+ Here is the call graph for this function:

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: