Unit tests.
More...
Protected Member Functions |
| setUp () |
Detailed Description
Member Function Documentation
assAnswerMatchingTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 35 of file assAnswerMatchingTest.php.
{
if (defined('ILIAS_PHPUNIT_CONTEXT'))
{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
ilUnitUtil::performInitialisation();
}
else
{
chdir( dirname( __FILE__ ) );
chdir('../../../');
}
}
assAnswerMatchingTest::test_instantiateObjectSimple |
( |
| ) |
|
Definition at line 49 of file assAnswerMatchingTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
$this->assertInstanceOf('ASS_AnswerMatching',$instance);
}
assAnswerMatchingTest::test_setGetDefinition |
( |
| ) |
|
Definition at line 136 of file assAnswerMatchingTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
$expected = 'Definition is this.';
$instance->setDefinition($expected);
$actual = $instance->getDefinition();
$this->assertEquals($expected,$actual);
}
assAnswerMatchingTest::test_setGetDefinitionId |
( |
| ) |
|
Definition at line 151 of file assAnswerMatchingTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
$expected = 10;
$instance->setDefinitionId($expected);
$actual = $instance->getDefinitionId();
$this->assertEquals($expected,$actual);
}
assAnswerMatchingTest::test_setGetPicture |
( |
| ) |
|
Definition at line 91 of file assAnswerMatchingTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
$expected = '/link/to/image?';
$instance->setPicture($expected);
$actual = $instance->getPicture();
$this->assertEquals($expected,$actual);
}
assAnswerMatchingTest::test_setGetPictureId |
( |
| ) |
|
Definition at line 106 of file assAnswerMatchingTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
$expected = 47;
$instance->setPictureId($expected);
$actual = $instance->getPictureId();
$this->assertEquals($expected,$actual);
}
assAnswerMatchingTest::test_setGetPictureId_NegativeShouldNotSetValue |
( |
| ) |
|
Definition at line 121 of file assAnswerMatchingTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
$expected = 0;
$instance->setPictureId(-47);
$actual = $instance->getPictureId();
$this->assertEquals($expected,$actual);
}
assAnswerMatchingTest::test_setGetPoints |
( |
| ) |
|
Definition at line 61 of file assAnswerMatchingTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
$expected = 10;
$instance->setPoints($expected);
$actual = $instance->getPoints();
$this->assertEquals($expected,$actual);
}
assAnswerMatchingTest::test_setGetTermId |
( |
| ) |
|
Definition at line 76 of file assAnswerMatchingTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
$expected = 10;
$instance->setTermId($expected);
$actual = $instance->getTermId();
$this->assertEquals($expected,$actual);
}
Field Documentation
assAnswerMatchingTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: