ILIAS  release_8 Revision v8.24
ilIndividualAssessmentSettingsTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
21use PHPUnit\Framework\TestCase;
23
28{
29 public function test_create_settings()
30 {
31 $obj_id = 10;
32 $title = 'My iass';
33 $description = 'Special iass for members';
34 $content = 'Everything you have learned';
35 $record_remplate = 'You should ask these things';
36 $event_time_place_required = true;
37 $file_required = false;
38
40 $obj_id,
41 $title,
42 $description,
43 $content,
44 $record_remplate,
45 $event_time_place_required,
46 $file_required
47 );
48 $this->assertEquals($obj_id, $settings->getObjId());
49 $this->assertEquals($title, $settings->getTitle());
50 $this->assertEquals($description, $settings->getDescription());
51 $this->assertEquals($content, $settings->getContent());
52 $this->assertEquals($record_remplate, $settings->getRecordTemplate());
53 $this->assertTrue($settings->isEventTimePlaceRequired());
54 $this->assertFalse($settings->isFileRequired());
55 }
56
57 public function test_to_form_input()
58 {
59 $lng = $this->createMock(ilLanguage::class);
60 $lng->expects($this->atLeastOnce())
61 ->method('txt')
62 ->willReturn("label")
63 ;
64
65 $df = new ILIAS\Data\Factory();
68 $this->createMock(\ILIAS\UI\Implementation\Component\Input\UploadLimitResolver::class),
69 new ILIAS\UI\Implementation\Component\SignalGenerator(),
70 $df,
72 $lng
73 );
74
75 $obj_id = 10;
76 $title = 'My iass';
77 $description = 'Special iass for members';
78 $content = 'Everything you have learned';
79 $record_remplate = 'You should ask these things';
80 $event_time_place_required = true;
81 $file_required = false;
82
84 $obj_id,
85 $title,
86 $description,
87 $content,
88 $record_remplate,
89 $event_time_place_required,
90 $file_required
91 );
92
93 $input = $settings->toFormInput(
94 $f,
95 $lng,
97 );
98
99 $this->assertInstanceOf(Section::class, $input);
100 }
101}
Factory for Date Formats.
Definition: Factory.php:27
Builds data types.
Definition: Factory.php:21
An object carrying settings of an Individual Assessment obj beyond the standard information.
This describes section inputs.
Definition: Section.php:29
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
Refinery Factory $refinery
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.
$lng