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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 test_setGetCorrectness_shouldReturnUnchangedState ()
 
 test_isTrue_shouldReturnTrue ()
 
 test_isFalse_shouldReturnFalseOnTrueState ()
 
 test_setFalseGetCorrectness_shouldReturnFalse ()
 
 test_setTrueIsTrue_shouldReturnUnchangedState ()
 
 test_setFalseIsFalse_shouldReturnUnchangedState ()
 

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

Member Function Documentation

◆ setUp()

assAnswerTrueFalseTest::setUp ( )
protected

Definition at line 30 of file assAnswerTrueFalseTest.php.

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

◆ test_instantiateObject_shouldReturnInstance()

assAnswerTrueFalseTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 35 of file assAnswerTrueFalseTest.php.

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

◆ test_isFalse_shouldReturnFalseOnTrueState()

assAnswerTrueFalseTest::test_isFalse_shouldReturnFalseOnTrueState ( )

Definition at line 64 of file assAnswerTrueFalseTest.php.

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

◆ test_isTrue_shouldReturnTrue()

assAnswerTrueFalseTest::test_isTrue_shouldReturnTrue ( )

Definition at line 53 of file assAnswerTrueFalseTest.php.

53  : void
54  {
55  $instance = new ASS_AnswerTrueFalse();
56  $expected = true;
57 
58  $instance->setCorrectness($expected);
59 
60  $this->assertEquals($expected, $instance->isTrue());
61  $this->assertEquals($expected, $instance->isCorrect());
62  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setFalseGetCorrectness_shouldReturnFalse()

assAnswerTrueFalseTest::test_setFalseGetCorrectness_shouldReturnFalse ( )

Definition at line 75 of file assAnswerTrueFalseTest.php.

75  : void
76  {
77  $instance = new ASS_AnswerTrueFalse();
78  $expected = false;
79 
80  $instance->setFalse();
81  $actual = $instance->getCorrectness();
82 
83  $this->assertEquals((bool) $expected, (bool) $actual);
84  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setFalseIsFalse_shouldReturnUnchangedState()

assAnswerTrueFalseTest::test_setFalseIsFalse_shouldReturnUnchangedState ( )

Definition at line 97 of file assAnswerTrueFalseTest.php.

97  : void
98  {
99  $instance = new ASS_AnswerTrueFalse();
100  $expected = true;
101 
102  $instance->setFalse();
103  $actual = $instance->isFalse();
104 
105  $this->assertEquals($expected, $actual);
106  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetCorrectness_shouldReturnUnchangedState()

assAnswerTrueFalseTest::test_setGetCorrectness_shouldReturnUnchangedState ( )

Definition at line 42 of file assAnswerTrueFalseTest.php.

42  : void
43  {
44  $instance = new ASS_AnswerTrueFalse();
45  $expected = true;
46 
47  $instance->setCorrectness($expected);
48  $actual = $instance->getCorrectness();
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_setTrueIsTrue_shouldReturnUnchangedState()

assAnswerTrueFalseTest::test_setTrueIsTrue_shouldReturnUnchangedState ( )

Definition at line 86 of file assAnswerTrueFalseTest.php.

86  : void
87  {
88  $instance = new ASS_AnswerTrueFalse();
89  $expected = true;
90 
91  $instance->setTrue();
92  $actual = $instance->isTrue();
93 
94  $this->assertEquals($expected, $actual);
95  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $backupGlobals

assAnswerTrueFalseTest::$backupGlobals = false
protected

Definition at line 28 of file assAnswerTrueFalseTest.php.


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