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

Public Member Functions

 testCreateObject ()
 
 testUpdateLPForChildEvent ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

ilTree $tree
 
ilLPStatusWrapper $lp_status
 

Detailed Description

Definition at line 46 of file ilLSLPEventHandlerTest.php.

Member Function Documentation

◆ setUp()

ilLSLPEventHandlerTest::setUp ( )
protected

Definition at line 51 of file ilLSLPEventHandlerTest.php.

51  : void
52  {
53  $this->tree = $this->createMock(ilTree::class);
54  $this->lp_status = new ilLPStatusWrapperStub();
55  }

◆ testCreateObject()

ilLSLPEventHandlerTest::testCreateObject ( )

Definition at line 57 of file ilLSLPEventHandlerTest.php.

57  : void
58  {
59  $obj = new ilLSLPEventHandler($this->tree, $this->lp_status);
60 
61  $this->assertInstanceOf(ilLSLPEventHandler::class, $obj);
62  }

◆ testUpdateLPForChildEvent()

ilLSLPEventHandlerTest::testUpdateLPForChildEvent ( )

Definition at line 64 of file ilLSLPEventHandlerTest.php.

64  : void
65  {
66  $values = [
67  'obj_id' => 12,
68  'usr_id' => 101
69  ];
70 
71  $obj_id = 43;
72 
73  $this->tree
74  ->expects($this->exactly(2))
75  ->method('getParentNodeData')
76  ->willReturn([
77  "type" => "lso",
78  "obj_id" => $obj_id
79  ])
80  ;
81 
82  $obj = new ilLSLPEventHandlerStub($this->tree, $this->lp_status);
83  $obj->updateLPForChildEvent($values);
84  //do not call getParentNodeData again!
85  $obj->updateLPForChildEvent($values);
86  }

Field Documentation

◆ $lp_status

ilLPStatusWrapper ilLSLPEventHandlerTest::$lp_status
protected

Definition at line 49 of file ilLSLPEventHandlerTest.php.

◆ $tree

ilTree ilLSLPEventHandlerTest::$tree
protected

Definition at line 48 of file ilLSLPEventHandlerTest.php.


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