ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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

◆ setUp()

ilTestFinalMarkLangVarBuilderTest::setUp ( )
protected

Definition at line 18 of file ilTestFinalMarkLangVarBuilderTest.php.

References defined.

19  {
20  if (defined('ILIAS_PHPUNIT_CONTEXT'))
21  {
22  include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
23  ilUnitUtil::performInitialisation();
24  }
25  else
26  {
27  chdir( dirname( __FILE__ ) );
28  chdir('../../../');
29  }
30  }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

◆ test_build()

ilTestFinalMarkLangVarBuilderTest::test_build ( )

Definition at line 32 of file ilTestFinalMarkLangVarBuilderTest.php.

References array.

33  {
34  $testCases = array(
35  array(
36  'param_passedStatus' => false, 'param_obligationsAnsweredStatus' => false, 'param_obligationsEnabled' => false,
37  'expected' => 'mark_tst_failed'
38  ),
39  array(
40  'param_passedStatus' => false, 'param_obligationsAnsweredStatus' => false, 'param_obligationsEnabled' => true,
41  'expected' => 'mark_tst_failed_obligations_missing'
42  ),
43  array(
44  'param_passedStatus' => false, 'param_obligationsAnsweredStatus' => true, 'param_obligationsEnabled' => false,
45  'expected' => 'mark_tst_failed'
46  ),
47  array(
48  'param_passedStatus' => false,
49  'param_obligationsAnsweredStatus' => true,
50  'param_obligationsEnabled' => true,
51  'expected' => 'mark_tst_failed_obligations_answered'
52  ),
53  array(
54  'param_passedStatus' => true,
55  'param_obligationsAnsweredStatus' => false,
56  'param_obligationsEnabled' => false,
57  'expected' => 'mark_tst_passed'
58  ),
59  array(
60  'param_passedStatus' => true,
61  'param_obligationsAnsweredStatus' => false,
62  'param_obligationsEnabled' => true,
63  'expected' => 'mark_tst_failed_obligations_missing'
64  ),
65  array(
66  'param_passedStatus' => true,
67  'param_obligationsAnsweredStatus' => true,
68  'param_obligationsEnabled' => false,
69  'expected' => 'mark_tst_passed'
70  ),
71  array(
72  'param_passedStatus' => true,
73  'param_obligationsAnsweredStatus' => true,
74  'param_obligationsEnabled' => true,
75  'expected' => 'mark_tst_passed_obligations_answered'
76  )
77  );
78  // OTX: Test breaks with fatal error...
79 // foreach($testCases as $case)
80 // {
81 // // arrange
82 //
83 // $passedStatus = $case['param_passedStatus'];
84 // $obligationsAnsweredStatus = $case['param_obligationsAnsweredStatus'];
85 // $obligationsEnabled = $case['param_obligationsEnabled'];
86 //
87 // $expected = $case['expected'];
88 //
89 // require_once './Modules/Test/classes/class.ilTestFinalMarkLangVarBuilder.php';
90 // $instance = new ilTestFinalMarkLangVarBuilder($passedStatus, $obligationsAnsweredStatus, $obligationsEnabled);
91 //
92 // // act
93 //
94 // $actual = $instance->build();
95 //
96 // // assert
97 //
98 // $this->assertEquals($expected, $actual);
99 // }
100  }
Create styles array
The data for the language used.

Field Documentation

◆ $backupGlobals

ilTestFinalMarkLangVarBuilderTest::$backupGlobals = FALSE
protected

Definition at line 16 of file ilTestFinalMarkLangVarBuilderTest.php.


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