ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilIndividualAssessmentInfoSettingsTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\TestCase;
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\Field\Node\Factory::class),
73 $this->createMock(\ILIAS\UI\Implementation\Component\Input\UploadLimitResolver::class),
74 new ILIAS\UI\Implementation\Component\SignalGenerator(),
75 $df,
77 $lng
78 );
79
81 33,
82 "contact",
83 "responsibility",
84 "phone",
85 "mails",
86 "consultation_hours"
87 );
88
89 $input = $settings->toFormInput(
90 $f,
91 $lng,
93 );
94
95 $this->assertInstanceOf(Section::class, $input);
96 }
97}
Factory for Date Formats.
Definition: Factory.php:27
Builds data types.
Definition: Factory.php:36
This describes section inputs.
Definition: Section.php:29
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $lng
Definition: privfeed.php:31