ILIAS  trunk Revision v11.0_alpha-1689-g66c127b4ae8
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilModulesOrgUnitOperationContextTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 {
26  {
28  $this->assertInstanceOf(ilOrgUnitOperationContext::class, $context);
29  $this->assertEquals(0, $context->getId());
30  $this->assertEquals(ilOrgUnitOperationContext::CONTEXT_OBJECT, $context->getContext());
31  $this->assertEquals(0, $context->getParentContextId());
32  $this->assertEquals([ilOrgUnitOperationContext::CONTEXT_OBJECT], $context->getPathNames());
33  $this->assertEquals([0], $context->getPathIds());
34  }
35 
37  {
39  $this->assertEquals(666, $context->getId());
40  $this->assertEquals(
42  $context->withContext(ilOrgUnitOperationContext::CONTEXT_CRS)->getContext()
43  );
44  $this->assertEquals(777, $context->withParentContextId(777)->getParentContextId());
45  $this->assertEquals(
48  ->getPathNames()
49  );
50  $this->assertEquals([999,888], $context->withPathIds([999,888])->getPathIds());
51  }
52 }
$context
Definition: webdav.php:31