ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
assAnswerClozeTest Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for assAnswerClozeTest:
+ Collaboration diagram for assAnswerClozeTest:

Public Member Functions

 test_constructorShouldReturnInstance ()
 
 test_setGetLowerBound ()
 
 test_setGetLowerBond_GreaterThanAnswerShouldSetAnswertext ()
 
 test_setGetLowerBound_nonNumericShouldSetAnswertext ()
 
 test_setGetUpperBound ()
 
 test_setGetUpperBound_smallerThanAnswerShouldSetAnswertext ()
 
 test_setGetUpperBound_nonNumericShouldSetAnswertext ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from assBaseTestCase
 setUp ()
 
 tearDown ()
 
 getIRSSMock ()
 

Protected Attributes

 $backupGlobals = false
 
- Protected Attributes inherited from assBaseTestCase
Container $dic = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Unit tests

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de

\

Definition at line 26 of file assAnswerClozeTest.php.

Member Function Documentation

◆ setUp()

assAnswerClozeTest::setUp ( )
protected

Reimplemented from assBaseTestCase.

Definition at line 30 of file assAnswerClozeTest.php.

30 : void
31 {
32 chdir(__DIR__ . '/../../../../');
33 }

◆ test_constructorShouldReturnInstance()

assAnswerClozeTest::test_constructorShouldReturnInstance ( )

Definition at line 35 of file assAnswerClozeTest.php.

35 : void
36 {
37 $instance = new assAnswerCloze();
38
39 $this->assertInstanceOf(assAnswerCloze::class, $instance);
40 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetLowerBond_GreaterThanAnswerShouldSetAnswertext()

assAnswerClozeTest::test_setGetLowerBond_GreaterThanAnswerShouldSetAnswertext ( )

Definition at line 53 of file assAnswerClozeTest.php.

53 : void
54 {
55 $instance = new assAnswerCloze('2');
56
57 $expected = '2';
58 $instance->setLowerBound(4);
59 $actual = $instance->getLowerBound();
60
61 $this->assertEquals($expected, $actual);
62 }

◆ test_setGetLowerBound()

assAnswerClozeTest::test_setGetLowerBound ( )

Definition at line 42 of file assAnswerClozeTest.php.

42 : void
43 {
44 $instance = new assAnswerCloze('2');
45
46 $expected = '1';
47 $instance->setLowerBound($expected);
48 $actual = $instance->getLowerBound();
49
50 $this->assertEquals($expected, $actual);
51 }

◆ test_setGetLowerBound_nonNumericShouldSetAnswertext()

assAnswerClozeTest::test_setGetLowerBound_nonNumericShouldSetAnswertext ( )

Definition at line 64 of file assAnswerClozeTest.php.

64 : void
65 {
66 $instance = new assAnswerCloze('3');
67
68 $expected = '3';
69 $instance->setLowerBound('test');
70 $actual = $instance->getLowerBound();
71
72 $this->assertEquals($expected, $actual);
73 }

◆ test_setGetUpperBound()

assAnswerClozeTest::test_setGetUpperBound ( )

Definition at line 75 of file assAnswerClozeTest.php.

75 : void
76 {
77 $instance = new assAnswerCloze('1');
78
79 $expected = '3';
80 $instance->setUpperBound($expected);
81 $actual = $instance->getUpperBound();
82
83 $this->assertEquals($expected, $actual);
84 }

◆ test_setGetUpperBound_nonNumericShouldSetAnswertext()

assAnswerClozeTest::test_setGetUpperBound_nonNumericShouldSetAnswertext ( )

Definition at line 97 of file assAnswerClozeTest.php.

97 : void
98 {
99 $instance = new assAnswerCloze('4');
100
101 $expected = '4';
102 $instance->setUpperBound('test');
103 $actual = $instance->getUpperBound();
104
105 $this->assertEquals($expected, $actual);
106 }

◆ test_setGetUpperBound_smallerThanAnswerShouldSetAnswertext()

assAnswerClozeTest::test_setGetUpperBound_smallerThanAnswerShouldSetAnswertext ( )

Definition at line 86 of file assAnswerClozeTest.php.

86 : void
87 {
88 $instance = new assAnswerCloze('4');
89
90 $expected = '4';
91 $instance->setUpperBound(2);
92 $actual = $instance->getUpperBound();
93
94 $this->assertEquals($expected, $actual);
95 }

Field Documentation

◆ $backupGlobals

assAnswerClozeTest::$backupGlobals = false
protected

Definition at line 28 of file assAnswerClozeTest.php.


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