Unit tests.
More...
◆ setUp()
assAnswerMatchingTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assAnswerMatchingTest.php.
References defined.
17 if (
defined(
'ILIAS_PHPUNIT_CONTEXT'))
19 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
20 ilUnitUtil::performInitialisation();
24 chdir( dirname( __FILE__ ) );
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
◆ test_instantiateObjectSimple()
assAnswerMatchingTest::test_instantiateObjectSimple |
( |
| ) |
|
Definition at line 29 of file assAnswerMatchingTest.php.
32 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
38 $this->assertInstanceOf(
'ASS_AnswerMatching',$instance);
Class for matching question answers.
◆ test_setGetDefinition()
assAnswerMatchingTest::test_setGetDefinition |
( |
| ) |
|
Definition at line 116 of file assAnswerMatchingTest.php.
119 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
121 $expected =
'Definition is this.';
124 $instance->setDefinition($expected);
125 $actual = $instance->getDefinition();
128 $this->assertEquals($expected,$actual);
Class for matching question answers.
◆ test_setGetDefinitionId()
assAnswerMatchingTest::test_setGetDefinitionId |
( |
| ) |
|
Definition at line 131 of file assAnswerMatchingTest.php.
134 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
139 $instance->setDefinitionId($expected);
140 $actual = $instance->getDefinitionId();
143 $this->assertEquals($expected,$actual);
Class for matching question answers.
◆ test_setGetPicture()
assAnswerMatchingTest::test_setGetPicture |
( |
| ) |
|
Definition at line 71 of file assAnswerMatchingTest.php.
74 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
76 $expected =
'/link/to/image?';
79 $instance->setPicture($expected);
80 $actual = $instance->getPicture();
83 $this->assertEquals($expected,$actual);
Class for matching question answers.
◆ test_setGetPictureId()
assAnswerMatchingTest::test_setGetPictureId |
( |
| ) |
|
Definition at line 86 of file assAnswerMatchingTest.php.
89 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
94 $instance->setPictureId($expected);
95 $actual = $instance->getPictureId();
98 $this->assertEquals($expected,$actual);
Class for matching question answers.
◆ test_setGetPictureId_NegativeShouldNotSetValue()
assAnswerMatchingTest::test_setGetPictureId_NegativeShouldNotSetValue |
( |
| ) |
|
Definition at line 101 of file assAnswerMatchingTest.php.
104 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
109 $instance->setPictureId(-47);
110 $actual = $instance->getPictureId();
113 $this->assertEquals($expected,$actual);
Class for matching question answers.
◆ test_setGetPoints()
assAnswerMatchingTest::test_setGetPoints |
( |
| ) |
|
Definition at line 41 of file assAnswerMatchingTest.php.
44 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
49 $instance->setPoints($expected);
50 $actual = $instance->getPoints();
53 $this->assertEquals($expected,$actual);
Class for matching question answers.
◆ test_setGetTermId()
assAnswerMatchingTest::test_setGetTermId |
( |
| ) |
|
Definition at line 56 of file assAnswerMatchingTest.php.
59 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
64 $instance->setTermId($expected);
65 $actual = $instance->getTermId();
68 $this->assertEquals($expected,$actual);
Class for matching question answers.
◆ $backupGlobals
assAnswerMatchingTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: