ILIAS  release_8 Revision v8.24
ilIndividualAssessmentInfoSettingsTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
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\UploadLimitResolver::class),
73 new ILIAS\UI\Implementation\Component\SignalGenerator(),
74 $df,
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,
92 );
93
94 $this->assertInstanceOf(Section::class, $input);
95 }
96}
Factory for Date Formats.
Definition: Factory.php:27
Builds data types.
Definition: Factory.php:21
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