Unit tests.
More...
Protected Member Functions |
| setUp () |
Detailed Description
Member Function Documentation
assAnswerMatchingTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 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 29 of file assAnswerMatchingTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
$this->assertInstanceOf('ASS_AnswerMatching',$instance);
}
assAnswerMatchingTest::test_setGetDefinition |
( |
| ) |
|
Definition at line 116 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 131 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 71 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 86 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 101 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 41 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 56 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: