ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
SettingsParticipantFunctionalityTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 {
28  public function testGetAndWithUsePreviousAnswerAllowed(bool $io): void
29  {
30  $Settings_participant_functionality = (new SettingsParticipantFunctionality(0))->withUsePreviousAnswerAllowed($io);
31 
32  $this->assertInstanceOf(SettingsParticipantFunctionality::class, $Settings_participant_functionality);
33  $this->assertEquals($io, $Settings_participant_functionality->getUsePreviousAnswerAllowed());
34  }
35 
36  public static function getAndWithUsePreviousAnswerAllowedDataProvider(): array
37  {
38  return [
39  [true],
40  [false]
41  ];
42  }
43 
47  public function testGetAndWithSuspendTestAllowed(bool $io): void
48  {
49  $Settings_participant_functionality = (new SettingsParticipantFunctionality(0))->withSuspendTestAllowed($io);
50 
51  $this->assertInstanceOf(SettingsParticipantFunctionality::class, $Settings_participant_functionality);
52  $this->assertEquals($io, $Settings_participant_functionality->getSuspendTestAllowed());
53  }
54 
55  public static function getAndWithSuspendTestAllowedDataProvider(): array
56  {
57  return [
58  [true],
59  [false]
60  ];
61  }
62 
66  public function testGetAndWithPostponedQuestionsMoveToEnd(bool $io): void
67  {
68  $Settings_participant_functionality = (new SettingsParticipantFunctionality(0))->withPostponedQuestionsMoveToEnd($io);
69 
70  $this->assertInstanceOf(SettingsParticipantFunctionality::class, $Settings_participant_functionality);
71  $this->assertEquals($io, $Settings_participant_functionality->getPostponedQuestionsMoveToEnd());
72  }
73 
74  public static function getAndWithPostponedQuestionsMoveToEndDataProvider(): array
75  {
76  return [
77  [true],
78  [false]
79  ];
80  }
81 
85  public function testGetAndWithQuestionListEnabled(bool $io): void
86  {
87  $Settings_participant_functionality = (new SettingsParticipantFunctionality(0))->withQuestionListEnabled($io);
88 
89  $this->assertInstanceOf(SettingsParticipantFunctionality::class, $Settings_participant_functionality);
90  $this->assertEquals($io, $Settings_participant_functionality->getQuestionListEnabled());
91  }
92 
93  public static function getAndWithQuestionListEnabledDataProvider(): array
94  {
95  return [
96  [true],
97  [false]
98  ];
99  }
100 
104  public function testGetAndWithUsrPassOverviewMode(int $io): void
105  {
106  $Settings_participant_functionality = (new SettingsParticipantFunctionality(0))->withUsrPassOverviewMode($io);
107 
108  $this->assertInstanceOf(SettingsParticipantFunctionality::class, $Settings_participant_functionality);
109  $this->assertEquals($io, $Settings_participant_functionality->getUsrPassOverviewMode());
110  }
111 
112  public static function getAndWithUsrPassOverviewModeDataProvider(): array
113  {
114  return [
115  [-1],
116  [0],
117  [1]
118  ];
119  }
120 
124  public function testGetAndWithQuestionMarkingEnabled(bool $io): void
125  {
126  $Settings_participant_functionality = (new SettingsParticipantFunctionality(0));
127  $Settings_participant_functionality = $Settings_participant_functionality->withQuestionMarkingEnabled($io);
128 
129  $this->assertInstanceOf(SettingsParticipantFunctionality::class, $Settings_participant_functionality);
130  $this->assertEquals($io, $Settings_participant_functionality->getQuestionMarkingEnabled());
131  }
132 
133  public static function getAndWithUsrPassOverviewEnabledDataProvider(): array
134  {
135  return [
136  [true],
137  [false]
138  ];
139  }
140 }
testGetAndWithSuspendTestAllowed(bool $io)
getAndWithSuspendTestAllowedDataProvider
testGetAndWithQuestionListEnabled(bool $io)
getAndWithQuestionListEnabledDataProvider
testGetAndWithUsePreviousAnswerAllowed(bool $io)
getAndWithUsePreviousAnswerAllowedDataProvider
testGetAndWithUsrPassOverviewMode(int $io)
getAndWithUsrPassOverviewModeDataProvider
testGetAndWithPostponedQuestionsMoveToEnd(bool $io)
getAndWithPostponedQuestionsMoveToEndDataProvider
testGetAndWithQuestionMarkingEnabled(bool $io)
getAndWithUsrPassOverviewEnabledDataProvider