ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
LSLearnerItemTest Class Reference
+ Inheritance diagram for LSLearnerItemTest:
+ Collaboration diagram for LSLearnerItemTest:

Public Member Functions

 testCreate ()
 
 testTurnedOffWithPostCondition (LSItem $object)
 testCreate More...
 
 testTurnedOffWithOrderNumber (LSItem $object)
 testCreate More...
 
 testTurnedOffWithOnline (LSItem $object)
 testCreate More...
 

Data Fields

const TYPE = "type"
 
const TITLE = "tile"
 
const DESC = "description"
 
const ICON_PATH = "icon_path"
 
const IS_ONLINE = true
 
const ORDER_NUMBER = 10
 
const REF_ID = 30
 
const USER_ID = 6
 
const LP_STATUS = 2
 
const AVAILABILITY_STATUS = 3
 

Protected Member Functions

 setUp ()
 

Protected Attributes

ilLSPostCondition $post_condition
 

Detailed Description

Definition at line 23 of file LSLearnerItemTest.php.

Member Function Documentation

◆ setUp()

LSLearnerItemTest::setUp ( )
protected

Definition at line 38 of file LSLearnerItemTest.php.

38  : void
39  {
40  $this->post_condition = new ilLSPostCondition(666, 'always');
41  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ testCreate()

LSLearnerItemTest::testCreate ( )

Definition at line 43 of file LSLearnerItemTest.php.

44  {
45  $ls_item = new LSItem(
46  self::TYPE,
47  self::TITLE,
48  self::DESC,
49  self::ICON_PATH,
50  self::IS_ONLINE,
51  self::ORDER_NUMBER,
52  $this->post_condition,
53  self::REF_ID
54  );
55 
56  $object = new LSLearnerItem(
57  self::USER_ID,
58  self::LP_STATUS,
59  self::AVAILABILITY_STATUS,
60  $ls_item
61  );
62 
63  $this->assertEquals(self::USER_ID, $object->getUserId());
64  $this->assertEquals(self::LP_STATUS, $object->getLearningProgressStatus());
65  $this->assertEquals(self::AVAILABILITY_STATUS, $object->getAvailability());
66 
67  return $object;
68  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: LSItem.php:24
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ testTurnedOffWithOnline()

LSLearnerItemTest::testTurnedOffWithOnline ( LSItem  $object)

testCreate

Definition at line 91 of file LSLearnerItemTest.php.

References LSItem\withOnline().

91  : void
92  {
93  $this->expectException(LogicException::class);
94  $object->withOnline(self::IS_ONLINE);
95  }
withOnline(bool $online)
Definition: LSItem.php:95
+ Here is the call graph for this function:

◆ testTurnedOffWithOrderNumber()

LSLearnerItemTest::testTurnedOffWithOrderNumber ( LSItem  $object)

testCreate

Definition at line 82 of file LSLearnerItemTest.php.

References LSItem\withOrderNumber().

82  : void
83  {
84  $this->expectException(LogicException::class);
85  $object->withOrderNumber(self::ORDER_NUMBER);
86  }
withOrderNumber(int $order_number)
Definition: LSItem.php:102
+ Here is the call graph for this function:

◆ testTurnedOffWithPostCondition()

LSLearnerItemTest::testTurnedOffWithPostCondition ( LSItem  $object)

testCreate

Definition at line 73 of file LSLearnerItemTest.php.

References LSItem\withPostCondition().

73  : void
74  {
75  $this->expectException(LogicException::class);
76  $object->withPostCondition($this->post_condition);
77  }
withPostCondition(ilLSPostCondition $post_condition)
Definition: LSItem.php:109
+ Here is the call graph for this function:

Field Documentation

◆ $post_condition

ilLSPostCondition LSLearnerItemTest::$post_condition
protected

Definition at line 36 of file LSLearnerItemTest.php.

◆ AVAILABILITY_STATUS

const LSLearnerItemTest::AVAILABILITY_STATUS = 3

Definition at line 34 of file LSLearnerItemTest.php.

◆ DESC

const LSLearnerItemTest::DESC = "description"

Definition at line 27 of file LSLearnerItemTest.php.

◆ ICON_PATH

const LSLearnerItemTest::ICON_PATH = "icon_path"

Definition at line 28 of file LSLearnerItemTest.php.

◆ IS_ONLINE

const LSLearnerItemTest::IS_ONLINE = true

Definition at line 29 of file LSLearnerItemTest.php.

◆ LP_STATUS

const LSLearnerItemTest::LP_STATUS = 2

Definition at line 33 of file LSLearnerItemTest.php.

◆ ORDER_NUMBER

const LSLearnerItemTest::ORDER_NUMBER = 10

Definition at line 30 of file LSLearnerItemTest.php.

◆ REF_ID

const LSLearnerItemTest::REF_ID = 30

Definition at line 31 of file LSLearnerItemTest.php.

◆ TITLE

const LSLearnerItemTest::TITLE = "tile"

Definition at line 26 of file LSLearnerItemTest.php.

◆ TYPE

const LSLearnerItemTest::TYPE = "type"

Definition at line 25 of file LSLearnerItemTest.php.

◆ USER_ID

const LSLearnerItemTest::USER_ID = 6

Definition at line 32 of file LSLearnerItemTest.php.


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