ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
SettingsGeneralTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
25 #[\PHPUnit\Framework\Attributes\DataProvider('getAndWithQuestionSetTypeDataProvider')]
26 public function testGetAndWithQuestionSetType(string $io): void
27 {
28 $Settings_general = (new SettingsGeneral(0))->withQuestionSetType($io);
29
30 $this->assertInstanceOf(SettingsGeneral::class, $Settings_general);
31 $this->assertEquals($io, $Settings_general->getQuestionSetType());
32 }
33
34 public static function getAndWithQuestionSetTypeDataProvider(): array
35 {
36 return [
39 ];
40 }
41
42 #[\PHPUnit\Framework\Attributes\DataProvider('getAndWithAnonymityDataProvider')]
43 public function testGetAndWithAnonymity(bool $io): void
44 {
45 $Settings_general = (new SettingsGeneral(0))->withAnonymity($io);
46
47 $this->assertInstanceOf(SettingsGeneral::class, $Settings_general);
48 $this->assertEquals($io, $Settings_general->getAnonymity());
49 }
50
51 public static function getAndWithAnonymityDataProvider(): array
52 {
53 return [
54 [true],
55 [false]
56 ];
57 }
58}
testGetAndWithQuestionSetType(string $io)
static getAndWithAnonymityDataProvider()
static getAndWithQuestionSetTypeDataProvider()
const QUESTION_SET_TYPE_RANDOM
const QUESTION_SET_TYPE_FIXED
Class ilTestBaseClass.