@@ -155,4 +155,84 @@ public function testStatusFilterFromEnvEmpty(): void
155155 // Clean up
156156 putenv ('QASE_TESTOPS_STATUS_FILTER ' );
157157 }
158+
159+ /**
160+ * @dataProvider booleanProvider
161+ */
162+ public function testDebugFromEnv (bool $ expected ): void
163+ {
164+ // Set environment variable with spaces
165+ putenv ("QASE_DEBUG= $ expected " );
166+
167+ $ configLoader = new ConfigLoader ($ this ->logger );
168+ $ config = $ configLoader ->getConfig ();
169+
170+ $ debug = $ config ->getDebug ();
171+ $ this ->assertEquals ($ expected , $ debug );
172+
173+ // Clean up
174+ putenv ('QASE_DEBUG ' );
175+ }
176+
177+ /**
178+ * @dataProvider booleanProvider
179+ */
180+ public function testDefectFromEnv (bool $ expected ): void
181+ {
182+ // Set environment variable with spaces
183+ putenv ("QASE_TESTOPS_DEFECT= $ expected " );
184+
185+ $ configLoader = new ConfigLoader ($ this ->logger );
186+ $ config = $ configLoader ->getConfig ();
187+
188+ $ isDefect = $ config ->testops ->isDefect ();
189+ $ this ->assertEquals ($ expected , $ isDefect );
190+
191+ // Clean up
192+ putenv ('QASE_TESTOPS_DEFECT ' );
193+ }
194+
195+ /**
196+ * @dataProvider booleanProvider
197+ */
198+ public function testRunCompleteFromEnv (bool $ expected ): void
199+ {
200+ // Set environment variable with spaces
201+ putenv ("QASE_TESTOPS_RUN_COMPLETE= $ expected " );
202+
203+ $ configLoader = new ConfigLoader ($ this ->logger );
204+ $ config = $ configLoader ->getConfig ();
205+
206+ $ isComplete = $ config ->testops ->run ->isComplete ();
207+ $ this ->assertEquals ($ expected , $ isComplete );
208+
209+ // Clean up
210+ putenv ('QASE_TESTOPS_RUN_COMPLETE ' );
211+ }
212+
213+ /**
214+ * @dataProvider booleanProvider
215+ */
216+ public function testCreateConfigurationsIfNotExistFromEnv (bool $ expected ): void
217+ {
218+ // Set environment variable with spaces
219+ putenv ("QASE_TESTOPS_CONFIGURATIONS_CREATE_IF_NOT_EXISTS= $ expected " );
220+
221+ $ configLoader = new ConfigLoader ($ this ->logger );
222+ $ config = $ configLoader ->getConfig ();
223+
224+ $ isCreateIfNotExists = $ config ->testops ->configurations ->isCreateIfNotExists ();
225+ $ this ->assertEquals ($ expected , $ isCreateIfNotExists );
226+
227+ // Clean up
228+ putenv ('QASE_TESTOPS_CONFIGURATIONS_CREATE_IF_NOT_EXISTS ' );
229+ }
230+
231+ public static function booleanProvider (): array
232+ {
233+ return [
234+ [true ],
235+ [false ],
236+ ];
237+ }
158238}
0 commit comments