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

Public Member Functions

 testOrgUnitPositionConstruction ()
 
 testOrgUnitPositionModification ()
 

Detailed Description

Definition at line 22 of file ilModulesOrgUnitPositionTest.php.

Member Function Documentation

◆ testOrgUnitPositionConstruction()

ilModulesOrgUnitPositionTest::testOrgUnitPositionConstruction ( )

Definition at line 24 of file ilModulesOrgUnitPositionTest.php.

24  : void
25  {
26  $pos = new ilOrgUnitPosition();
27  $this->assertInstanceOf(ilOrgUnitPosition::class, $pos);
28  $this->assertEquals(0, $pos->getId());
29  $this->assertEquals('', $pos->getTitle());
30  $this->assertEquals('', $pos->getDescription());
31  $this->assertEquals(false, $pos->isCorePosition());
32  $this->assertEquals(0, $pos->getCoreIdentifier());
33  $this->assertEquals('', (string) $pos);
34  $this->assertEquals([], $pos->getAuthorities());
35  }

◆ testOrgUnitPositionModification()

ilModulesOrgUnitPositionTest::testOrgUnitPositionModification ( )

Definition at line 37 of file ilModulesOrgUnitPositionTest.php.

References ilOrgUnitPosition\CORE_POSITION_EMPLOYEE.

37  : void
38  {
39  $pos = new ilOrgUnitPosition(666);
40  $this->assertEquals(666, $pos->getId());
41  $this->assertEquals('Hello world', $pos->withTitle('Hello world')->getTitle());
42  $this->assertEquals('Hello world', (string) $pos->withTitle('Hello world'));
43  $this->assertEquals('Hello world is a greeting', $pos->withDescription('Hello world is a greeting')->getDescription());
44  $this->assertEquals(ilOrgUnitPosition::CORE_POSITION_EMPLOYEE, $pos->withCoreIdentifier(ilOrgUnitPosition::CORE_POSITION_EMPLOYEE)->getCoreIdentifier());
45  $this->assertEquals(true, $pos->withCorePosition(true)->isCorePosition());
46  }

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