ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilIndividualAssessmentInfoSettingsTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
23 
25 {
26  public function test_createObject_simple(): void
27  {
29 
30  $this->assertInstanceOf(ilIndividualAssessmentInfoSettings::class, $obj);
31 
32  $this->assertEquals(22, $obj->getObjId());
33  $this->assertNull($obj->getContact());
34  $this->assertNull($obj->getResponsibility());
35  $this->assertNull($obj->getPhone());
36  $this->assertNull($obj->getMails());
37  $this->assertNull($obj->getConsultationHours());
38  }
39 
40  public function test_createObject_full(): void
41  {
43  33,
44  "contact",
45  "responsibility",
46  "phone",
47  "mails",
48  "consultation_hours"
49  );
50 
51  $this->assertInstanceOf(ilIndividualAssessmentInfoSettings::class, $obj);
52 
53  $this->assertEquals(33, $obj->getObjId());
54  $this->assertEquals("contact", $obj->getContact());
55  $this->assertEquals("responsibility", $obj->getResponsibility());
56  $this->assertEquals("phone", $obj->getPhone());
57  $this->assertEquals("mails", $obj->getMails());
58  $this->assertEquals("consultation_hours", $obj->getConsultationHours());
59  }
60 
61  public function test_to_form_input()
62  {
63  $lng = $this->createMock(ilLanguage::class);
64  $lng->expects($this->atLeastOnce())
65  ->method('txt')
66  ->willReturn("label")
67  ;
68 
69  $df = new ILIAS\Data\Factory();
72  $this->createMock(\ILIAS\UI\Implementation\Component\Input\UploadLimitResolver::class),
73  new ILIAS\UI\Implementation\Component\SignalGenerator(),
74  $df,
75  $refinery,
76  $lng
77  );
78 
80  33,
81  "contact",
82  "responsibility",
83  "phone",
84  "mails",
85  "consultation_hours"
86  );
87 
88  $input = $settings->toFormInput(
89  $f,
90  $lng,
91  $refinery
92  );
93 
94  $this->assertInstanceOf(Section::class, $input);
95  }
96 }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
Class Factory.
$lng
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Refinery Factory $refinery