ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
assAnswerErrorTextTest 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 assAnswerErrorTextTest:
+ Collaboration diagram for assAnswerErrorTextTest:

Public Member Functions

 test_instantiateObjectSimple ()
 
 test_instantiateObjectFull ()
 
 test_instantiateObjectFullHasCorrectValues ()
 
 test_withPoints_valid ()
 
 test_withPosition_valid ()
 

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 for assAnswerErrorTextTest

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

\

Definition at line 26 of file assAnswerErrorTextTest.php.

Member Function Documentation

◆ setUp()

assAnswerErrorTextTest::setUp ( )
protected

Definition at line 30 of file assAnswerErrorTextTest.php.

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

◆ test_instantiateObjectFull()

assAnswerErrorTextTest::test_instantiateObjectFull ( )

Definition at line 43 of file assAnswerErrorTextTest.php.

43  : void
44  {
45  $instance = new assAnswerErrorText(
46  'errortext',
47  'correcttext',
48  0.01,
49  21,
50  );
51 
52  $this->assertInstanceOf(assAnswerErrorText::class, $instance);
53  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_instantiateObjectFullHasCorrectValues()

assAnswerErrorTextTest::test_instantiateObjectFullHasCorrectValues ( )

Definition at line 55 of file assAnswerErrorTextTest.php.

55  : void
56  {
57  $instance = new assAnswerErrorText(
58  'errortext',
59  'correcttext',
60  0.01,
61  21,
62  );
63 
64  $this->assertInstanceOf(assAnswerErrorText::class, $instance);
65  $this->assertEquals('errortext', $instance->getTextWrong());
66  $this->assertEquals('correcttext', $instance->getTextCorrect());
67  $this->assertEquals(0.01, $instance->getPoints());
68  $this->assertEquals(21, $instance->getPosition());
69  $this->assertEquals(1, $instance->getLength());
70  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_instantiateObjectSimple()

assAnswerErrorTextTest::test_instantiateObjectSimple ( )

Definition at line 35 of file assAnswerErrorTextTest.php.

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

◆ test_withPoints_valid()

assAnswerErrorTextTest::test_withPoints_valid ( )

Definition at line 72 of file assAnswerErrorTextTest.php.

72  : void
73  {
74  $instance = new assAnswerErrorText('errortext');
75  $expected = 0.01;
76 
77  $instance_with_points = $instance->withPoints($expected);
78  $actual = $instance_with_points->getPoints();
79 
80  $this->assertEquals($actual, $expected);
81  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_withPosition_valid()

assAnswerErrorTextTest::test_withPosition_valid ( )

Definition at line 83 of file assAnswerErrorTextTest.php.

83  : void
84  {
85  $instance = new assAnswerErrorText('errortext');
86  $expected = 21;
87 
88  $instance_with_position = $instance->withPosition($expected);
89  $actual = $instance_with_position->getPosition();
90 
91  $this->assertEquals($actual, $expected);
92  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $backupGlobals

assAnswerErrorTextTest::$backupGlobals = false
protected

Definition at line 28 of file assAnswerErrorTextTest.php.


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