Unit tests.
More...
Protected Member Functions |
| setUp () |
Detailed Description
Member Function Documentation
assAnswerTrueFalseTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assAnswerTrueFalseTest.php.
{
if (defined('ILIAS_PHPUNIT_CONTEXT'))
{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
ilUnitUtil::performInitialisation();
}
else
{
chdir( dirname( __FILE__ ) );
chdir('../../../');
}
}
assAnswerTrueFalseTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 29 of file assAnswerTrueFalseTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
$this->assertInstanceOf('ASS_AnswerTrueFalse', $instance);
}
assAnswerTrueFalseTest::test_isFalse_shouldReturnFalseOnTrueState |
( |
| ) |
|
Definition at line 70 of file assAnswerTrueFalseTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
$expected = false;
$instance->setCorrectness(true);
$this->assertEquals($expected, $instance->isFalse());
$this->assertEquals($expected, $instance->isIncorrect());
}
assAnswerTrueFalseTest::test_isTrue_shouldReturnTrue |
( |
| ) |
|
Definition at line 55 of file assAnswerTrueFalseTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
$expected = true;
$instance->setCorrectness($expected);
$this->assertEquals($expected, $instance->isTrue());
$this->assertEquals($expected, $instance->isCorrect());
}
assAnswerTrueFalseTest::test_setFalseGetCorrectness_shouldReturnFalse |
( |
| ) |
|
: Fix bug! getCorrectness returns int instead of bool.
Definition at line 88 of file assAnswerTrueFalseTest.php.
{
$this->markTestIncomplete('Bug detected, fix not applied yet due to poor coverage.');
require_once './Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
$expected = false;
$instance->setFalse();
$actual = $instance->getCorrectness();
$this->assertEquals($expected, $actual);
}
assAnswerTrueFalseTest::test_setFalseIsFalse_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 120 of file assAnswerTrueFalseTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
$expected = true;
$instance->setFalse();
$actual = $instance->isFalse();
$this->assertEquals($expected, $actual);
}
assAnswerTrueFalseTest::test_setGetCorrectness_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 40 of file assAnswerTrueFalseTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
$expected = true;
$instance->setCorrectness($expected);
$actual = $instance->getCorrectness();
$this->assertEquals($expected, $actual);
}
assAnswerTrueFalseTest::test_setTrueIsTrue_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 105 of file assAnswerTrueFalseTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
$expected = true;
$instance->setTrue();
$actual = $instance->isTrue();
$this->assertEquals($expected, $actual);
}
Field Documentation
assAnswerTrueFalseTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: