ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilIndividualAssessmentSettingsTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
23 
24 #[\PHPUnit\Framework\Attributes\BackupGlobals(false)]
26 {
27  public function test_create_settings()
28  {
29  $obj_id = 10;
30  $title = 'My iass';
31  $description = 'Special iass for members';
32  $content = 'Everything you have learned';
33  $record_remplate = 'You should ask these things';
34  $event_time_place_required = true;
35  $file_required = false;
36 
37  $settings = new ilIndividualAssessmentSettings(
38  $obj_id,
39  $title,
40  $description,
41  $content,
42  $record_remplate,
43  $event_time_place_required,
44  $file_required
45  );
46  $this->assertEquals($obj_id, $settings->getObjId());
47  $this->assertEquals($title, $settings->getTitle());
48  $this->assertEquals($description, $settings->getDescription());
49  $this->assertEquals($content, $settings->getContent());
50  $this->assertEquals($record_remplate, $settings->getRecordTemplate());
51  $this->assertTrue($settings->isEventTimePlaceRequired());
52  $this->assertFalse($settings->isFileRequired());
53  }
54 
55  public function test_to_form_input()
56  {
57  $lng = $this->createMock(ilLanguage::class);
58  $lng->expects($this->atLeastOnce())
59  ->method('txt')
60  ->willReturn("label")
61  ;
62 
63  $df = new ILIAS\Data\Factory();
66  $this->createMock(\ILIAS\UI\Implementation\Component\Input\Field\Node\Factory::class),
67  $this->createMock(\ILIAS\UI\Implementation\Component\Input\UploadLimitResolver::class),
68  new ILIAS\UI\Implementation\Component\SignalGenerator(),
69  $df,
70  $refinery,
71  $lng
72  );
73 
74  $obj_id = 10;
75  $title = 'My iass';
76  $description = 'Special iass for members';
77  $content = 'Everything you have learned';
78  $record_remplate = 'You should ask these things';
79  $event_time_place_required = true;
80  $file_required = false;
81 
82  $settings = new ilIndividualAssessmentSettings(
83  $obj_id,
84  $title,
85  $description,
86  $content,
87  $record_remplate,
88  $event_time_place_required,
89  $file_required
90  );
91 
92  $input = $settings->toFormInput(
93  $f,
94  $lng,
95  $refinery
96  );
97 
98  $this->assertInstanceOf(Section::class, $input);
99  }
100 }
Interface Observer Contains several chained tasks and infos about them.
An object carrying settings of an Individual Assessment obj beyond the standard information.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $lng
Definition: privfeed.php:31