ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilQTIResponseLabelTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 {
25  public function testConstruct(): void
26  {
27  $this->assertInstanceOf(ilQTIResponseLabel::class, new ilQTIResponseLabel());
28  }
29 
33  public function testSetGetRshuffle(string $input, ?string $expected): void
34  {
35  $instance = new ilQTIResponseLabel();
36  $instance->setRshuffle($input);
37  $this->assertEquals($expected, $instance->getRshuffle());
38  }
39 
43  public function testSetGetRarea(string $input, ?string $expected): void
44  {
45  $instance = new ilQTIResponseLabel();
46  $instance->setRarea($input);
47  $this->assertEquals($expected, $instance->getRarea());
48  }
49 
53  public function testSetGetRrange(string $input, ?string $expected): void
54  {
55  $instance = new ilQTIResponseLabel();
56  $instance->setRrange($input);
57  $this->assertEquals($expected, $instance->getRrange());
58  }
59 
60  public function testSetGetLabelrefid(): void
61  {
62  $instance = new ilQTIResponseLabel();
63  $instance->setLabelrefid('Some input.');
64  $this->assertEquals('Some input.', $instance->getLabelrefid());
65  }
66 
67  public function testSetGetIdent(): void
68  {
69  $instance = new ilQTIResponseLabel();
70  $instance->setIdent('Some input.');
71  $this->assertEquals('Some input.', $instance->getIdent());
72  }
73 
74  public function testSetGetMatchGroup(): void
75  {
76  $instance = new ilQTIResponseLabel();
77  $instance->setMatchGroup('Some input.');
78  $this->assertEquals('Some input.', $instance->getMatchGroup());
79  }
80 
81  public function testSetGetMatchMax(): void
82  {
83  $instance = new ilQTIResponseLabel();
84  $instance->setMatchMax('Some input.');
85  $this->assertEquals('Some input.', $instance->getMatchMax());
86  }
87 
88  public function testSetGetContent(): void
89  {
90  $instance = new ilQTIResponseLabel();
91  $instance->setContent('Some input.');
92  $this->assertEquals('Some input.', $instance->getContent());
93  }
94 
95  public static function rshuffles(): array
96  {
97  class_exists(ilQTIResponseLabel::class); // Force autoload to define the constants.
98 
99  return [
104  ['Random input', null],
105  ];
106  }
107 
108  public static function areas(): array
109  {
110  class_exists(ilQTIResponseLabel::class); // Force autoload to define the constants.
111  return [
118  ['Random input', null],
119  ];
120  }
121 
122  public static function rranges(): array
123  {
124  class_exists(ilQTIResponseLabel::class); // Force autoload to define the constants.
125  return [
130  ];
131  }
132 }
testSetGetRarea(string $input, ?string $expected)
areas
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
testSetGetRshuffle(string $input, ?string $expected)
rshuffles
testSetGetRrange(string $input, ?string $expected)
rranges