ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
SettingsResultDetailsTest.php
Go to the documentation of this file.
1 <?php
2 
19 namespace ScoreReporting;
20 
23 
25 {
26  public function testConstruct(): void
27  {
28  $settingsResultDetails = new SettingsResultDetails(0);
29  $this->assertInstanceOf(SettingsResultDetails::class, $settingsResultDetails);
30  }
31 
35  public function testGetAndWithResultsPresentation(int $IO): void
36  {
37  $settingsResultDetails = new SettingsResultDetails(0);
38  $settingsResultDetails = $settingsResultDetails->withResultsPresentation($IO);
39  $this->assertEquals($IO, $settingsResultDetails->getResultsPresentation());
40  }
41 
42  public static function getAndWithResultsPresentationDataProvider(): array
43  {
44  return [
45  [-1],
46  [0],
47  [1]
48  ];
49  }
50 
54  public function testGetAndShowExamIdInTestResults(bool $IO): void
55  {
56  $settingsResultDetails = new SettingsResultDetails(0);
57  $settingsResultDetails = $settingsResultDetails->withShowExamIdInTestResults($IO);
58  $this->assertEquals($IO, $settingsResultDetails->getShowExamIdInTestResults());
59  }
60 
61  public static function getAndShowExamIdInTestResultsDataProvider(): array
62  {
63  return [
64  [false],
65  [true]
66  ];
67  }
68 
72  public function testGetAndWithShowPassDetails(bool $IO): void
73  {
74  $settingsResultDetails = new SettingsResultDetails(0);
75  $settingsResultDetails = $settingsResultDetails->withShowPassDetails($IO);
76  $this->assertEquals($IO, $settingsResultDetails->getShowPassDetails());
77  }
78 
79  public static function getAndWithShowPassDetailsDataProvider(): array
80  {
81  return [
82  [false],
83  [true]
84  ];
85  }
86 
90  public function testGetAndWithShowSolutionPrintview(bool $IO): void
91  {
92  $settingsResultDetails = new SettingsResultDetails(0);
93  $settingsResultDetails = $settingsResultDetails->withShowSolutionPrintview($IO);
94  $this->assertEquals($IO, $settingsResultDetails->getShowSolutionPrintview());
95  }
96 
97  public static function getAndWithShowSolutionPrintviewDataProvider(): array
98  {
99  return [
100  [false],
101  [true]
102  ];
103  }
104 
108  public function testGetShowSolutionFeedback(bool $IO): void
109  {
110  $settingsResultDetails = new SettingsResultDetails(0);
111  $settingsResultDetails = $settingsResultDetails->withShowSolutionFeedback($IO);
112  $this->assertEquals($IO, $settingsResultDetails->getShowSolutionFeedback());
113  }
114 
115  public static function getAndWithShowSolutionFeedbackDataProvider(): array
116  {
117  return [
118  [false],
119  [true]
120  ];
121  }
122 
126  public function testGetAndWithShowSolutionAnswersOnly(bool $IO): void
127  {
128  $settingsResultDetails = new SettingsResultDetails(0);
129  $settingsResultDetails = $settingsResultDetails->withShowSolutionAnswersOnly($IO);
130  $this->assertEquals($IO, $settingsResultDetails->getShowSolutionAnswersOnly());
131  }
132 
133  public static function getAndWithShowSolutionAnswersOnlyDataProvider(): array
134  {
135  return [
136  [false],
137  [true]
138  ];
139  }
140 
144  public function testGetAndWithShowSolutionSignature(bool $IO): void
145  {
146  $settingsResultDetails = new SettingsResultDetails(0);
147  $settingsResultDetails = $settingsResultDetails->withShowSolutionSignature($IO);
148  $this->assertEquals($IO, $settingsResultDetails->getShowSolutionSignature());
149  }
150 
151  public static function getAndWithShowSolutionSignatureDataProvider(): array
152  {
153  return [
154  [false],
155  [true]
156  ];
157  }
158 
162  public function testGetAndWithShowSolutionSuggested(bool $IO): void
163  {
164  $settingsResultDetails = new SettingsResultDetails(0);
165  $settingsResultDetails = $settingsResultDetails->withShowSolutionSuggested($IO);
166  $this->assertEquals($IO, $settingsResultDetails->getShowSolutionSuggested());
167  }
168 
169  public static function getAndWithShowSolutionSuggestedDataProvider(): array
170  {
171  return [
172  [false],
173  [true]
174  ];
175  }
176 
180  public function testGetAndWithShowSolutionListComparison(bool $IO): void
181  {
182  $settingsResultDetails = new SettingsResultDetails(0);
183  $settingsResultDetails = $settingsResultDetails->withShowSolutionListComparison($IO);
184  $this->assertEquals($IO, $settingsResultDetails->getShowSolutionListComparison());
185  }
186 
187  public static function getAndWithShowSolutionListComparisonDataProvider(): array
188  {
189  return [
190  [false],
191  [true]
192  ];
193  }
194 
198  public function testGetAndWithExportSettings(int $IO): void
199  {
200  $settingsResultDetails = new SettingsResultDetails(0);
201  $settingsResultDetails = $settingsResultDetails->withExportSettings($IO);
202  $this->assertEquals($IO, $settingsResultDetails->getExportSettings());
203  }
204 
205  public static function getAndWithExportSettingsDataProvider(): array
206  {
207  return [
208  [-1],
209  [0],
210  [1]
211  ];
212  }
213 }
testGetAndWithShowSolutionSignature(bool $IO)
getAndWithShowSolutionSignatureDataProvider
testGetAndWithShowSolutionPrintview(bool $IO)
getAndWithShowSolutionPrintviewDataProvider
testGetAndWithShowSolutionAnswersOnly(bool $IO)
getAndWithShowSolutionAnswersOnlyDataProvider
testGetShowSolutionFeedback(bool $IO)
getAndWithShowSolutionFeedbackDataProvider
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
testGetAndWithShowPassDetails(bool $IO)
getAndWithShowPassDetailsDataProvider
testGetAndWithResultsPresentation(int $IO)
getAndWithResultsPresentationDataProvider
testGetAndShowExamIdInTestResults(bool $IO)
getAndShowExamIdInTestResultsDataProvider
testGetAndWithShowSolutionListComparison(bool $IO)
getAndWithShowSolutionListComparisonDataProvider
testGetAndWithExportSettings(int $IO)
getAndWithExportSettingsDataProvider
testGetAndWithShowSolutionSuggested(bool $IO)
getAndWithShowSolutionSuggestedDataProvider