ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilModulesOrgUnitAuthorityTest Class Reference
+ Inheritance diagram for ilModulesOrgUnitAuthorityTest:
+ Collaboration diagram for ilModulesOrgUnitAuthorityTest:

Public Member Functions

 testOrgUnitAuthorityConstruction ()
 
 testOrgUnitAuthorityModification ()
 
 testOrgUnitAuthorityInvalidScope ()
 

Detailed Description

Definition at line 23 of file ilModulesOrgUnitAuthorityTest.php.

Member Function Documentation

◆ testOrgUnitAuthorityConstruction()

ilModulesOrgUnitAuthorityTest::testOrgUnitAuthorityConstruction ( )

Definition at line 25 of file ilModulesOrgUnitAuthorityTest.php.

References ilOrgUnitAuthority\OVER_EVERYONE, and ilOrgUnitAuthority\SCOPE_SAME_ORGU.

25  : void
26  {
27  $auth = new ilOrgUnitAuthority();
28  $this->assertInstanceOf(ilOrgUnitAuthority::class, $auth);
29  $this->assertEquals(0, $auth->getId());
30  $this->assertEquals(ilOrgUnitAuthority::OVER_EVERYONE, $auth->getOver());
31  $this->assertEquals(ilOrgUnitAuthority::SCOPE_SAME_ORGU, $auth->getScope());
32  $this->assertEquals(0, $auth->getPositionId());
33  $this->assertEquals('0', (string) $auth);
34  }
Class ilOrguAuthority.

◆ testOrgUnitAuthorityInvalidScope()

ilModulesOrgUnitAuthorityTest::testOrgUnitAuthorityInvalidScope ( )

Definition at line 49 of file ilModulesOrgUnitAuthorityTest.php.

49  : void
50  {
51  $this->expectException(\ilException::class);
52  $auth = (new ilOrgUnitAuthority())
53  ->withScope(444);
54  }
Class ilOrguAuthority.

◆ testOrgUnitAuthorityModification()

ilModulesOrgUnitAuthorityTest::testOrgUnitAuthorityModification ( )

Definition at line 36 of file ilModulesOrgUnitAuthorityTest.php.

References ilOrgUnitAuthority\SCOPE_SUBSEQUENT_ORGUS.

36  : void
37  {
38  $auth = new ilOrgUnitAuthority(666);
39  $this->assertEquals(666, $auth->getId());
40  $this->assertEquals('666', (string) $auth);
41  $this->assertEquals(555, $auth->withOver(555)->getOver());
42  $this->assertEquals(
44  $auth->withScope(ilOrgUnitAuthority::SCOPE_SUBSEQUENT_ORGUS)->getScope()
45  );
46  $this->assertEquals(333, $auth->withPositionId(333)->getPositionId());
47  }
Class ilOrguAuthority.

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