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

Public Member Functions

 test_create_instance ()
 
 test_with_finalized_changed ()
 
 testToFormInput ()
 

Detailed Description

Definition at line 26 of file ilIndividualAssessmentUserGradingTest.php.

Member Function Documentation

◆ test_create_instance()

ilIndividualAssessmentUserGradingTest::test_create_instance ( )

Definition at line 28 of file ilIndividualAssessmentUserGradingTest.php.

29 {
30 $name = 'Hans Günther';
31 $record = 'The guy was really good';
32 $internal_note = 'This is a node just for me.';
33 $file = null;
34 $is_file_visible = false;
36 $place = 'Area 51';
37 $event_time = new DateTimeImmutable();
38 $notify = true;
39 $finalized = false;
41 $name,
42 $record,
43 $internal_note,
44 $file,
45 $is_file_visible,
47 $place,
48 $event_time,
49 $notify,
50 $finalized
51 );
52
53 $this->assertInstanceOf(ilIndividualAssessmentUserGrading::class, $grading);
54 $this->assertEquals($name, $grading->getName());
55 $this->assertEquals($record, $grading->getRecord());
56 $this->assertEquals($internal_note, $grading->getInternalNote());
57 $this->assertNull($grading->getFile());
58 $this->assertFalse($grading->isFileVisible());
59 $this->assertEquals($learning_progress, $grading->getLearningProgress());
60 $this->assertEquals($place, $grading->getPlace());
61 $this->assertEquals($event_time, $grading->getEventTime());
62 $this->assertTrue($grading->isNotify());
63 $this->assertFalse($grading->isFinalized());
64 }
$learning_progress
Definition: plugin.php:29
bool $notify

References $learning_progress, $notify, and ilIndividualAssessmentMembers\LP_IN_PROGRESS.

◆ test_with_finalized_changed()

ilIndividualAssessmentUserGradingTest::test_with_finalized_changed ( )

Definition at line 66 of file ilIndividualAssessmentUserGradingTest.php.

67 {
68 $name = 'Hans Günther';
69 $record = 'The guy was really good';
70 $internal_note = 'This is a node just for me.';
71 $file = 'report.pdf';
72 $is_file_visible = true;
74 $place = 'Area 51 Underground';
75 $event_time = new DateTimeImmutable();
76 $notify = false;
77 $finalized = false;
79 $name,
80 $record,
81 $internal_note,
82 $file,
83 $is_file_visible,
85 $place,
86 $event_time,
87 $notify,
88 $finalized
89 );
90
91 $this->assertInstanceOf(ilIndividualAssessmentUserGrading::class, $grading);
92 $this->assertEquals($name, $grading->getName());
93 $this->assertEquals($record, $grading->getRecord());
94 $this->assertEquals($internal_note, $grading->getInternalNote());
95 $this->assertEquals($file, $grading->getFile());
96 $this->assertTrue($grading->isFileVisible());
97 $this->assertEquals($learning_progress, $grading->getLearningProgress());
98 $this->assertEquals($place, $grading->getPlace());
99 $this->assertEquals($event_time, $grading->getEventTime());
100 $this->assertFalse($grading->isNotify());
101 $this->assertFalse($grading->isFinalized());
102
103 $n_grading = $grading->withFinalized(true);
104 $this->assertEquals($name, $n_grading->getName());
105 $this->assertEquals($record, $n_grading->getRecord());
106 $this->assertEquals($internal_note, $n_grading->getInternalNote());
107 $this->assertEquals($file, $n_grading->getFile());
108 $this->assertTrue($n_grading->isFileVisible());
109 $this->assertEquals($learning_progress, $n_grading->getLearningProgress());
110 $this->assertEquals($place, $n_grading->getPlace());
111 $this->assertEquals($event_time, $n_grading->getEventTime());
112 $this->assertFalse($n_grading->isNotify());
113 $this->assertTrue($n_grading->isFinalized());
114
115 $this->assertNotSame($n_grading, $grading);
116 }

References $learning_progress, $notify, and ilIndividualAssessmentMembers\LP_IN_PROGRESS.

◆ testToFormInput()

ilIndividualAssessmentUserGradingTest::testToFormInput ( )

Definition at line 118 of file ilIndividualAssessmentUserGradingTest.php.

118 : void
119 {
120 $lng = $this->createMock(ilLanguage::class);
121 $lng->expects($this->atLeastOnce())
122 ->method('txt')
123 ->willReturn("label")
124 ;
125 $file_handler = $this->createMock(AbstractCtrlAwareUploadHandler::class);
126 $df = new ILIAS\Data\Factory();
129 $this->createMock(\ILIAS\UI\Implementation\Component\Input\Field\Node\Factory::class),
130 $this->createMock(\ILIAS\UI\Implementation\Component\Input\UploadLimitResolver::class),
131 new ILIAS\UI\Implementation\Component\SignalGenerator(),
132 $df,
133 $refinery,
134 $lng
135 );
136
137 $name = 'Hans Günther';
138 $record = 'The guy was really good';
139 $internal_note = 'This is a node just for me.';
140 $file = 'report.pdf';
141 $is_file_visible = true;
143 $place = 'Area 51 Underground';
144 $event_time = new DateTimeImmutable();
145 $notify = false;
146 $finalized = false;
147 $record_template = "Record Template";
149 $name,
150 $record,
151 $internal_note,
152 $file,
153 $is_file_visible,
155 $place,
156 $event_time,
157 $notify,
158 $finalized
159 );
160
161 $input = $grading->toFormInput(
162 $f,
163 $df,
164 $lng,
165 $refinery,
166 $file_handler,
167 $df->dateFormat()->standard(),
168 $record_template,
169 [
173 ]
174 );
175
176 $this->assertInstanceOf(Section::class, $input);
177 }
Factory for Date Formats.
Definition: Factory.php:27
Builds data types.
Definition: Factory.php:36
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $lng
Definition: privfeed.php:31

References Vendor\Package\$f, $learning_progress, $lng, $notify, ILIAS\UI\examples\Layout\Page\Standard\$refinery, ilIndividualAssessmentMembers\LP_COMPLETED, ilIndividualAssessmentMembers\LP_FAILED, and ilIndividualAssessmentMembers\LP_IN_PROGRESS.


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