ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestFinalMarkLangVarBuilderTest Class Reference
+ Inheritance diagram for ilTestFinalMarkLangVarBuilderTest:
+ Collaboration diagram for ilTestFinalMarkLangVarBuilderTest:

Public Member Functions

 test_build ()

Protected Member Functions

 setUp ()

Protected Attributes

 $backupGlobals = FALSE

Detailed Description

Definition at line 14 of file ilTestFinalMarkLangVarBuilderTest.php.

Member Function Documentation

ilTestFinalMarkLangVarBuilderTest::setUp ( )
protected

Definition at line 18 of file ilTestFinalMarkLangVarBuilderTest.php.

{
if (defined('ILIAS_PHPUNIT_CONTEXT'))
{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
ilUnitUtil::performInitialisation();
}
else
{
chdir( dirname( __FILE__ ) );
chdir('../../../');
}
}
ilTestFinalMarkLangVarBuilderTest::test_build ( )

Definition at line 32 of file ilTestFinalMarkLangVarBuilderTest.php.

{
$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)
{
// arrange
$passedStatus = $case['param_passedStatus'];
$obligationsAnsweredStatus = $case['param_obligationsAnsweredStatus'];
$obligationsEnabled = $case['param_obligationsEnabled'];
$expected = $case['expected'];
require_once './Modules/Test/classes/class.ilTestFinalMarkLangVarBuilder.php';
$instance = new ilTestFinalMarkLangVarBuilder($passedStatus, $obligationsAnsweredStatus, $obligationsEnabled);
// act
$actual = $instance->build();
// assert
$this->assertEquals($expected, $actual);
}
}

Field Documentation

ilTestFinalMarkLangVarBuilderTest::$backupGlobals = FALSE
protected

Definition at line 16 of file ilTestFinalMarkLangVarBuilderTest.php.


The documentation for this class was generated from the following file: