ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilQTIItemfeedbackTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
23 
24 class ilQTIItemfeedbackTest extends TestCase
25 {
26  public function testConstruct(): void
27  {
28  $this->assertInstanceOf(ilQTIItemfeedback::class, new ilQTIItemfeedback());
29  }
30 
35  public function testSetGetView(string $input, ?string $expected): void
36  {
37  $instance = new ilQTIItemfeedback();
38  $instance->setView($input);
39  $this->assertEquals($expected, $instance->getView());
40  }
41 
42  public function testSetGetIdent(): void
43  {
44  $instance = new ilQTIItemfeedback();
45  $instance->setIdent('Some input.');
46  $this->assertEquals('Some input.', $instance->getIdent());
47  }
48 
49  public function testSetGetTitle(): void
50  {
51  $instance = new ilQTIItemfeedback();
52  $instance->setTitle('Some input.');
53  $this->assertEquals('Some input.', $instance->getTitle());
54  }
55 
56  public function views(): array
57  {
58  class_exists(ilQTIItemfeedback::class); // Force autoload to define the constants.
59  return [
63  ['administrator', ilQTIItemfeedback::VIEW_ADMINISTRATOR],
65  ['adminauthority', ilQTIItemfeedback::VIEW_ADMINAUTHORITY],
71  ['candidate', ilQTIItemfeedback::VIEW_CANDIDATE],
73  ['invigilatorproctor', ilQTIItemfeedback::VIEW_INVIGILATORPROCTOR],
75  ['psychometrician', ilQTIItemfeedback::VIEW_PSYCHOMETRICIAN],
80  ['11', null],
81  ['Random input.', null],
82  ];
83  }
84 }
testSetGetView(string $input, ?string $expected)
testConstruct views