ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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
 
const LP_MODE = 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 39 of file LSLearnerItemTest.php.

39  : void
40  {
41  $this->post_condition = new ilLSPostCondition(666, 'always');
42  }
A PostCondition does restrict the progression of a user through the learning sequence.

◆ testCreate()

LSLearnerItemTest::testCreate ( )

Definition at line 44 of file LSLearnerItemTest.php.

45  {
46  $ls_item = new LSItem(
47  self::TYPE,
48  self::TITLE,
49  self::DESC,
50  self::ICON_PATH,
51  self::IS_ONLINE,
52  self::ORDER_NUMBER,
53  $this->post_condition,
54  self::REF_ID,
55  self::LP_MODE
56  );
57 
58  $object = new LSLearnerItem(
59  self::USER_ID,
60  self::LP_STATUS,
61  self::AVAILABILITY_STATUS,
62  $ls_item
63  );
64 
65  $this->assertEquals(self::USER_ID, $object->getUserId());
66  $this->assertEquals(self::LP_STATUS, $object->getLearningProgressStatus());
67  $this->assertEquals(self::AVAILABILITY_STATUS, $object->getAvailability());
68 
69  return $object;
70  }
Data holding class LSItem .
Definition: LSItem.php:24
Add learning progress and availability information to the LSItem.

◆ testTurnedOffWithOnline()

LSLearnerItemTest::testTurnedOffWithOnline ( LSItem  $object)

testCreate

Definition at line 93 of file LSLearnerItemTest.php.

References LSItem\withOnline().

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

◆ testTurnedOffWithOrderNumber()

LSLearnerItemTest::testTurnedOffWithOrderNumber ( LSItem  $object)

testCreate

Definition at line 84 of file LSLearnerItemTest.php.

References LSItem\withOrderNumber().

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

◆ testTurnedOffWithPostCondition()

LSLearnerItemTest::testTurnedOffWithPostCondition ( LSItem  $object)

testCreate

Definition at line 75 of file LSLearnerItemTest.php.

References LSItem\withPostCondition().

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

Field Documentation

◆ $post_condition

ilLSPostCondition LSLearnerItemTest::$post_condition
protected

Definition at line 37 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_MODE

const LSLearnerItemTest::LP_MODE = 3

Definition at line 35 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: