ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
SettingsGeneralTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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 }
const QUESTION_SET_TYPE_RANDOM
static getAndWithQuestionSetTypeDataProvider()
testGetAndWithQuestionSetType(string $io)
static getAndWithAnonymityDataProvider()
const QUESTION_SET_TYPE_FIXED