ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilModulesOrgUnitOperationTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\TestCase;
22
23class ilModulesOrgUnitOperationTest extends TestCase
24{
25 public function testOrgUnitOperationConstruction(): void
26 {
27 $operation = new ilOrgUnitOperation();
28 $this->assertInstanceOf(ilOrgUnitOperation::class, $operation);
29 $this->assertEquals(0, $operation->getOperationId());
30 $this->assertEquals('', $operation->getOperationString());
31 $this->assertEquals('', $operation->getDescription());
32 $this->assertEquals(0, $operation->getContextId());
33 $this->assertEquals(0, $operation->getListOrder());
34 }
35
36 public function testOrgUnitOperationModification(): void
37 {
38 $operation = new ilOrgUnitOperation(666);
39 $this->assertEquals(666, $operation->getOperationId());
40 $this->assertEquals(
42 $operation->withOperationString(ilOrgUnitOperation::OP_MANAGE_MEMBERS)->getOperationString()
43 );
44 $this->assertEquals('This is a test', $operation->withDescription('This is a test')->getDescription());
45 $this->assertEquals(777, $operation->withContextId(777)->getContextId());
46 $this->assertEquals(5, $operation->withListOrder(5)->getListOrder());
47 }
48}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...