Unit tests.
More...
Protected Member Functions |
| setUp () |
Detailed Description
Member Function Documentation
assAnswerSimpleTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assAnswerSimpleTest.php.
{
if (defined('ILIAS_PHPUNIT_CONTEXT'))
{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
ilUnitUtil::performInitialisation();
}
else
{
chdir( dirname( __FILE__ ) );
chdir('../../../');
}
}
assAnswerSimpleTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 29 of file assAnswerSimpleTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
$this->assertInstanceOf('ASS_AnswerSimple', $instance);
}
assAnswerSimpleTest::test_setGetAnswertext_shouldReturnUnchangedAnswertext |
( |
| ) |
|
Definition at line 55 of file assAnswerSimpleTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
$expected = 'The answer, of course, is 42.';
$instance->setAnswertext($expected);
$actual = $instance->getAnswertext();
$this->assertEquals($expected, $actual);
}
assAnswerSimpleTest::test_setGetId_shouldReturnUnchangedId |
( |
| ) |
|
Definition at line 40 of file assAnswerSimpleTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
$expected = 1;
$instance->setId($expected);
$actual = $instance->getId();
$this->assertEquals($expected, $actual);
}
assAnswerSimpleTest::test_setGetOrder_shouldReturnUnchangedOrder |
( |
| ) |
|
Definition at line 102 of file assAnswerSimpleTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
$expected = 42;
$instance->setOrder($expected);
$actual = $instance->getOrder();
$this->assertEquals($expected, $actual);
}
assAnswerSimpleTest::test_setGetPoints_shouldReturnUnchangedPoints |
( |
| ) |
|
Definition at line 70 of file assAnswerSimpleTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
$expected = 42;
$instance->setPoints($expected);
$actual = $instance->getPoints();
$this->assertEquals($expected, $actual);
}
assAnswerSimpleTest::test_setGetPoints_shouldReturnUnchangedZeroOnNonNumericInput |
( |
| ) |
|
Definition at line 85 of file assAnswerSimpleTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
$expected = 0.0;
$instance->setPoints('Günther');
$actual = $instance->getPoints();
$this->assertEquals($expected, $actual);
}
Field Documentation
assAnswerSimpleTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: