21 if (defined(
'ILIAS_PHPUNIT_CONTEXT'))
23 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
24 ilUnitUtil::performInitialisation();
28 chdir( dirname( __FILE__ ) );
37 'param_passedStatus' =>
false,
'param_obligationsAnsweredStatus' =>
false,
'param_obligationsEnabled' =>
false,
38 'expected' =>
'mark_tst_failed'
41 'param_passedStatus' =>
false,
'param_obligationsAnsweredStatus' =>
false,
'param_obligationsEnabled' =>
true,
42 'expected' =>
'mark_tst_failed_obligations_missing'
45 'param_passedStatus' =>
false,
'param_obligationsAnsweredStatus' =>
true,
'param_obligationsEnabled' =>
false,
46 'expected' =>
'mark_tst_failed'
49 'param_passedStatus' =>
false,
50 'param_obligationsAnsweredStatus' =>
true,
51 'param_obligationsEnabled' =>
true,
52 'expected' =>
'mark_tst_failed_obligations_answered'
55 'param_passedStatus' =>
true,
56 'param_obligationsAnsweredStatus' =>
false,
57 'param_obligationsEnabled' =>
false,
58 'expected' =>
'mark_tst_passed'
61 'param_passedStatus' =>
true,
62 'param_obligationsAnsweredStatus' =>
false,
63 'param_obligationsEnabled' =>
true,
64 'expected' =>
'mark_tst_failed_obligations_missing'
67 'param_passedStatus' =>
true,
68 'param_obligationsAnsweredStatus' =>
true,
69 'param_obligationsEnabled' =>
false,
70 'expected' =>
'mark_tst_passed'
73 'param_passedStatus' =>
true,
74 'param_obligationsAnsweredStatus' =>
true,
75 'param_obligationsEnabled' =>
true,
76 'expected' =>
'mark_tst_passed_obligations_answered'
80 foreach($testCases as $case)
84 $passedStatus = $case[
'param_passedStatus'];
85 $obligationsAnsweredStatus = $case[
'param_obligationsAnsweredStatus'];
86 $obligationsEnabled = $case[
'param_obligationsEnabled'];
88 $expected = $case[
'expected'];
90 include_once
'./Modules/Test/classes/class.ilTestFinalMarkLangVarBuilder.php';
95 $actual = $instance->build();
99 $this->assertEquals($expected, $actual);