{
$testCases = array(
array(
'param_passedStatus' => false, 'param_obligationsAnsweredStatus' => false, 'param_obligationsEnabled' => false,
'expected' => 'mark_tst_failed'
),
array(
'param_passedStatus' => false, 'param_obligationsAnsweredStatus' => false, 'param_obligationsEnabled' => true,
'expected' => 'mark_tst_failed_obligations_missing'
),
array(
'param_passedStatus' => false, 'param_obligationsAnsweredStatus' => true, 'param_obligationsEnabled' => false,
'expected' => 'mark_tst_failed'
),
array(
'param_passedStatus' => false,
'param_obligationsAnsweredStatus' => true,
'param_obligationsEnabled' => true,
'expected' => 'mark_tst_failed_obligations_answered'
),
array(
'param_passedStatus' => true,
'param_obligationsAnsweredStatus' => false,
'param_obligationsEnabled' => false,
'expected' => 'mark_tst_passed'
),
array(
'param_passedStatus' => true,
'param_obligationsAnsweredStatus' => false,
'param_obligationsEnabled' => true,
'expected' => 'mark_tst_failed_obligations_missing'
),
array(
'param_passedStatus' => true,
'param_obligationsAnsweredStatus' => true,
'param_obligationsEnabled' => false,
'expected' => 'mark_tst_passed'
),
array(
'param_passedStatus' => true,
'param_obligationsAnsweredStatus' => true,
'param_obligationsEnabled' => true,
'expected' => 'mark_tst_passed_obligations_answered'
)
);
foreach($testCases as $case)
{
$passedStatus = $case['param_passedStatus'];
$obligationsAnsweredStatus = $case['param_obligationsAnsweredStatus'];
$obligationsEnabled = $case['param_obligationsEnabled'];
$expected = $case['expected'];
include_once './Modules/Test/classes/class.ilTestFinalMarkLangVarBuilder.php';
$actual = $instance->build();
$this->assertEquals($expected, $actual);
}
}