ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
LSLearnerItemTest Class Reference
+ Inheritance diagram for LSLearnerItemTest:
+ Collaboration diagram for LSLearnerItemTest:

Public Member Functions

 setUp ()
 
 testCreate ()
 
 testTurnedOffWithPostCondition (LSItem $object)
 @depends testCreate More...
 
 testTurnedOffWithOrderNumber (LSItem $object)
 @depends testCreate More...
 
 testTurnedOffWithOnline (LSItem $object)
 @depends 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 Attributes

 $post_condition
 

Detailed Description

Definition at line 8 of file LSLearnerItemTest.php.

Member Function Documentation

◆ setUp()

LSLearnerItemTest::setUp ( )

Definition at line 26 of file LSLearnerItemTest.php.

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

◆ testCreate()

LSLearnerItemTest::testCreate ( )

Definition at line 31 of file LSLearnerItemTest.php.

32 {
33 $ls_item = new LSItem(
34 self::TYPE,
35 self::TITLE,
36 self::DESC,
37 self::ICON_PATH,
38 self::IS_ONLINE,
39 self::ORDER_NUMBER,
40 $this->post_condition,
41 self::REF_ID
42 );
43
44 $object = new LSLearnerItem(
45 self::USER_ID,
46 self::LP_STATUS,
47 self::AVAILABILITY_STATUS,
48 $ls_item
49 );
50
51 $this->assertEquals($object->getUserId(), self::USER_ID);
52 $this->assertEquals($object->getLearningProgressStatus(), self::LP_STATUS);
53 $this->assertEquals($object->getAvailability(), self::AVAILABILITY_STATUS);
54
55 return $object;
56 }
Data holding class LSItem .
Definition: LSItem.php:12
Add learning progress and availability information to the LSItem.

◆ testTurnedOffWithOnline()

LSLearnerItemTest::testTurnedOffWithOnline ( LSItem  $object)

@depends testCreate

Definition at line 79 of file LSLearnerItemTest.php.

80 {
81 $this->expectException(LogicException::class);
82 $object->withOnline(self::IS_ONLINE);
83 }
withOnline(bool $online)
Definition: LSItem.php:98

References LSItem\withOnline().

+ Here is the call graph for this function:

◆ testTurnedOffWithOrderNumber()

LSLearnerItemTest::testTurnedOffWithOrderNumber ( LSItem  $object)

@depends testCreate

Definition at line 70 of file LSLearnerItemTest.php.

71 {
72 $this->expectException(LogicException::class);
73 $object->withOrderNumber(self::ORDER_NUMBER);
74 }
withOrderNumber(int $order_number)
Definition: LSItem.php:110

References LSItem\withOrderNumber().

+ Here is the call graph for this function:

◆ testTurnedOffWithPostCondition()

LSLearnerItemTest::testTurnedOffWithPostCondition ( LSItem  $object)

@depends testCreate

Definition at line 61 of file LSLearnerItemTest.php.

62 {
63 $this->expectException(LogicException::class);
64 $object->withPostCondition($this->post_condition);
65 }
withPostCondition(ilLSPostCondition $postcondition)
Definition: LSItem.php:122

References LSItem\withPostCondition().

+ Here is the call graph for this function:

Field Documentation

◆ $post_condition

LSLearnerItemTest::$post_condition
protected

Definition at line 24 of file LSLearnerItemTest.php.

◆ AVAILABILITY_STATUS

const LSLearnerItemTest::AVAILABILITY_STATUS = 3

Definition at line 19 of file LSLearnerItemTest.php.

◆ DESC

const LSLearnerItemTest::DESC = "description"

Definition at line 12 of file LSLearnerItemTest.php.

◆ ICON_PATH

const LSLearnerItemTest::ICON_PATH = "icon_path"

Definition at line 13 of file LSLearnerItemTest.php.

◆ IS_ONLINE

const LSLearnerItemTest::IS_ONLINE = true

Definition at line 14 of file LSLearnerItemTest.php.

◆ LP_STATUS

const LSLearnerItemTest::LP_STATUS = 2

Definition at line 18 of file LSLearnerItemTest.php.

◆ ORDER_NUMBER

const LSLearnerItemTest::ORDER_NUMBER = 10

Definition at line 15 of file LSLearnerItemTest.php.

◆ REF_ID

const LSLearnerItemTest::REF_ID = 30

Definition at line 16 of file LSLearnerItemTest.php.

◆ TITLE

const LSLearnerItemTest::TITLE = "tile"

Definition at line 11 of file LSLearnerItemTest.php.

◆ TYPE

const LSLearnerItemTest::TYPE = "type"

Definition at line 10 of file LSLearnerItemTest.php.

◆ USER_ID

const LSLearnerItemTest::USER_ID = 6

Definition at line 17 of file LSLearnerItemTest.php.


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