ILIAS  trunk Revision v5.2.0beta1-34115-g3a2438be29
assAnswerMultipleResponseTest 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 assAnswerMultipleResponseTest:
+ Collaboration diagram for assAnswerMultipleResponseTest:

Public Member Functions

 test_instantiateObjectSimple ()
 
 test_setGetPointsUnchecked ()
 
 test_setGetPointsUnchecked_InvalidPointsBecomeZero ()
 
 test_setGetPointsChecked ()
 

Protected Member Functions

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

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 assAnswerMultipleResponseTest.php.

Member Function Documentation

◆ setUp()

assAnswerMultipleResponseTest::setUp ( )
protected

Definition at line 30 of file assAnswerMultipleResponseTest.php.

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

◆ test_instantiateObjectSimple()

assAnswerMultipleResponseTest::test_instantiateObjectSimple ( )

Definition at line 35 of file assAnswerMultipleResponseTest.php.

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

◆ test_setGetPointsChecked()

assAnswerMultipleResponseTest::test_setGetPointsChecked ( )

Definition at line 64 of file assAnswerMultipleResponseTest.php.

64  : void
65  {
66  $instance = new ASS_AnswerMultipleResponse();
67  $expected = 2;
68 
69  $instance->setPointsChecked($expected);
70  $actual = $instance->getPointsChecked();
71 
72  $this->assertEquals($expected, $actual);
73  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetPointsUnchecked()

assAnswerMultipleResponseTest::test_setGetPointsUnchecked ( )

Definition at line 42 of file assAnswerMultipleResponseTest.php.

42  : void
43  {
44  $instance = new ASS_AnswerMultipleResponse();
45  $expected = 1;
46 
47  $instance->setPointsUnchecked($expected);
48  $actual = $instance->getPointsUnchecked();
49 
50  $this->assertEquals($expected, $actual);
51  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetPointsUnchecked_InvalidPointsBecomeZero()

assAnswerMultipleResponseTest::test_setGetPointsUnchecked_InvalidPointsBecomeZero ( )

Definition at line 53 of file assAnswerMultipleResponseTest.php.

53  : void
54  {
55  $instance = new ASS_AnswerMultipleResponse();
56  $expected = 0;
57 
58  $instance->setPointsUnchecked('Günther');
59  $actual = $instance->getPointsUnchecked();
60 
61  $this->assertEquals($expected, $actual);
62  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $backupGlobals

assAnswerMultipleResponseTest::$backupGlobals = false
protected

Definition at line 28 of file assAnswerMultipleResponseTest.php.


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