ILIAS  release_8 Revision v8.24
ilQTIRenderFibTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22use PHPUnit\Framework\TestCase;
23
24class ilQTIRenderFibTest extends TestCase
25{
26 public function testConstruct(): void
27 {
28 $this->assertInstanceOf(ilQTIRenderFib::class, new ilQTIRenderFib());
29 }
30
31 public function testSetGetMinnumber(): void
32 {
33 $instance = new ilQTIRenderFib();
34 $instance->setMinnumber('Some input.');
35 $this->assertEquals('Some input.', $instance->getMinnumber());
36 }
37
38 public function testSetGetMaxnumber(): void
39 {
40 $instance = new ilQTIRenderFib();
41 $instance->setMaxnumber('Some input.');
42 $this->assertEquals('Some input.', $instance->getMaxnumber());
43 }
44
48 public function testSetGetPrompt(string $input, ?string $expected): void
49 {
50 $instance = new ilQTIRenderFib();
51 $instance->setPrompt($input);
52 $this->assertEquals($expected, $instance->getPrompt());
53 }
54
58 public function testSetGetFibtype(string $input, ?string $expected): void
59 {
60 $instance = new ilQTIRenderFib();
61 $instance->setFibtype($input);
62 $this->assertEquals($expected, $instance->getFibtype());
63 }
64
65 public function testSetGetRows(): void
66 {
67 $instance = new ilQTIRenderFib();
68 $instance->setRows('Some input.');
69 $this->assertEquals('Some input.', $instance->getRows());
70 }
71
72 public function testSetGetMaxchars(): void
73 {
74 $instance = new ilQTIRenderFib();
75 $instance->setMaxchars('Some input.');
76 $this->assertEquals('Some input.', $instance->getMaxchars());
77 }
78
79 public function testSetGetColumns(): void
80 {
81 $instance = new ilQTIRenderFib();
82 $instance->setColumns('Some input.');
83 $this->assertEquals('Some input.', $instance->getColumns());
84 }
85
86 public function testSetGetCharset(): void
87 {
88 $instance = new ilQTIRenderFib();
89 $instance->setCharset('Some input.');
90 $this->assertEquals('Some input.', $instance->getCharset());
91 }
92
93 public function prompts(): array
94 {
95 class_exists(ilQTIRenderFib::class); // Force autoload to define the constants.
96 return [
105 ];
106 }
107
108 public function fibtypes(): array
109 {
110 class_exists(ilQTIRenderFib::class); // Force autoload to define the constants.
111 return [
120 ];
121 }
122}
testSetGetPrompt(string $input, ?string $expected)
@dataProvider prompts
testSetGetFibtype(string $input, ?string $expected)
@dataProvider fibtypes