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