ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
LSLearnerItemTest Class Reference
+ Inheritance diagram for LSLearnerItemTest:
+ Collaboration diagram for LSLearnerItemTest:

Public Member Functions

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

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:25
Add learning progress and availability information to the LSItem.

◆ testTurnedOffWithOnline()

LSLearnerItemTest::testTurnedOffWithOnline ( LSItem  $object)

Definition at line 87 of file LSLearnerItemTest.php.

87 : void
88 {
89 $this->expectException(LogicException::class);
90 $object->withOnline(self::IS_ONLINE);
91 }
withOnline(bool $online)
Definition: LSItem.php:103

References LSItem\withOnline().

+ Here is the call graph for this function:

◆ testTurnedOffWithOrderNumber()

LSLearnerItemTest::testTurnedOffWithOrderNumber ( LSItem  $object)

Definition at line 80 of file LSLearnerItemTest.php.

80 : void
81 {
82 $this->expectException(LogicException::class);
83 $object->withOrderNumber(self::ORDER_NUMBER);
84 }
withOrderNumber(int $order_number)
Definition: LSItem.php:110

References LSItem\withOrderNumber().

+ Here is the call graph for this function:

◆ testTurnedOffWithPostCondition()

LSLearnerItemTest::testTurnedOffWithPostCondition ( LSItem  $object)

Definition at line 73 of file LSLearnerItemTest.php.

73 : void
74 {
75 $this->expectException(LogicException::class);
76 $object->withPostCondition($this->post_condition);
77 }
withPostCondition(ilLSPostCondition $post_condition)
Definition: LSItem.php:117

References LSItem\withPostCondition().

+ 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: