ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLSLPEventHandlerTest Class Reference
+ Inheritance diagram for ilLSLPEventHandlerTest:
+ Collaboration diagram for ilLSLPEventHandlerTest:

Public Member Functions

 testCreateObject ()
 
 testUpdateLPForChildEvent ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $tree
 
 $lp_status
 

Detailed Description

Definition at line 29 of file ilLSLPEventHandlerTest.php.

Member Function Documentation

◆ setUp()

ilLSLPEventHandlerTest::setUp ( )
protected

Definition at line 41 of file ilLSLPEventHandlerTest.php.

41  : void
42  {
43  $this->tree = $this->createMock(ilTree::class);
44  $this->lp_status = new ilLPStatusWrapperStub();
45  }

◆ testCreateObject()

ilLSLPEventHandlerTest::testCreateObject ( )

Definition at line 47 of file ilLSLPEventHandlerTest.php.

47  : void
48  {
49  $obj = new ilLSLPEventHandler($this->tree, $this->lp_status);
50 
51  $this->assertInstanceOf(ilLSLPEventHandler::class, $obj);
52  }

◆ testUpdateLPForChildEvent()

ilLSLPEventHandlerTest::testUpdateLPForChildEvent ( )

Definition at line 54 of file ilLSLPEventHandlerTest.php.

54  : void
55  {
56  $values = [
57  'obj_id' => 12,
58  'usr_id' => 101
59  ];
60 
61  $obj_id = 43;
62 
63  $this->tree
64  ->expects($this->exactly(2))
65  ->method('getParentNodeData')
66  ->willReturn($obj_id)
67  ;
68 
69  $obj = new ilLSLPEventHandlerStub($this->tree, $this->lp_status);
70  $obj->updateLPForChildEvent($values);
71  //do not call getParentNodeData again!
72  $obj->updateLPForChildEvent($values);
73  }

Field Documentation

◆ $lp_status

ilLSLPEventHandlerTest::$lp_status
protected

Definition at line 39 of file ilLSLPEventHandlerTest.php.

◆ $tree

ilLSLPEventHandlerTest::$tree
protected

Definition at line 34 of file ilLSLPEventHandlerTest.php.


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