ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilQTIItemfeedbackTest.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(ilQTIItemfeedback::class, new ilQTIItemfeedback());
28  }
29 
34  public function testSetGetView(string $input, ?string $expected): void
35  {
36  $instance = new ilQTIItemfeedback();
37  $instance->setView($input);
38  $this->assertEquals($expected, $instance->getView());
39  }
40 
41  public function testSetGetIdent(): void
42  {
43  $instance = new ilQTIItemfeedback();
44  $instance->setIdent('Some input.');
45  $this->assertEquals('Some input.', $instance->getIdent());
46  }
47 
48  public function testSetGetTitle(): void
49  {
50  $instance = new ilQTIItemfeedback();
51  $instance->setTitle('Some input.');
52  $this->assertEquals('Some input.', $instance->getTitle());
53  }
54 
55  public static function views(): array
56  {
57  class_exists(ilQTIItemfeedback::class); // Force autoload to define the constants.
58  return [
62  ['administrator', ilQTIItemfeedback::VIEW_ADMINISTRATOR],
64  ['adminauthority', ilQTIItemfeedback::VIEW_ADMINAUTHORITY],
70  ['candidate', ilQTIItemfeedback::VIEW_CANDIDATE],
72  ['invigilatorproctor', ilQTIItemfeedback::VIEW_INVIGILATORPROCTOR],
74  ['psychometrician', ilQTIItemfeedback::VIEW_PSYCHOMETRICIAN],
79  ['11', null],
80  ['Random input.', null],
81  ];
82  }
83 }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
testSetGetView(string $input, ?string $expected)
testConstruct views