ILIAS  release_4-3 Revision
 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 15 of file ilTestFinalMarkLangVarBuilderTest.php.

Member Function Documentation

ilTestFinalMarkLangVarBuilderTest::setUp ( )
protected

Definition at line 19 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 33 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'];
include_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 17 of file ilTestFinalMarkLangVarBuilderTest.php.


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