Unit tests.
More...
Protected Member Functions |
| setUp () |
Detailed Description
Member Function Documentation
assAnswerBinaryStateTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assAnswerBinaryStateTest.php.
{
if (defined('ILIAS_PHPUNIT_CONTEXT'))
{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
ilUnitUtil::performInitialisation();
}
else
{
chdir( dirname( __FILE__ ) );
chdir('../../../');
}
}
assAnswerBinaryStateTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 29 of file assAnswerBinaryStateTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
$this->assertInstanceOf('ASS_AnswerBinaryState', $instance);
}
assAnswerBinaryStateTest::test_isStateChecked_shouldReturnActualState |
( |
| ) |
|
Definition at line 55 of file assAnswerBinaryStateTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
$expected = 1;
$instance->setState($expected);
$actual = $instance->isStateChecked();
$this->assertEquals($expected, $actual);
}
assAnswerBinaryStateTest::test_isStateSet_shouldReturnActualState |
( |
| ) |
|
Definition at line 70 of file assAnswerBinaryStateTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
$expected = 1;
$instance->setState($expected);
$actual = $instance->isStateSet();
$this->assertEquals($expected, $actual);
}
assAnswerBinaryStateTest::test_isStateUnchecked_shouldReturnActualState |
( |
| ) |
|
Definition at line 100 of file assAnswerBinaryStateTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
$expected = 1;
$instance->setState($expected);
$actual = !$instance->isStateUnchecked();
$this->assertEquals($expected, $actual);
}
assAnswerBinaryStateTest::test_isStateUnset_shouldReturnActualState |
( |
| ) |
|
Definition at line 85 of file assAnswerBinaryStateTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
$expected = 1;
$instance->setState($expected);
$actual = !$instance->isStateUnset();
$this->assertEquals($expected, $actual);
}
assAnswerBinaryStateTest::test_setChecked_shouldAlterState |
( |
| ) |
|
Definition at line 115 of file assAnswerBinaryStateTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
$expected = 0;
$instance->setState($expected);
$instance->setChecked();
$actual = $instance->isStateUnchecked();
$this->assertEquals($expected, $actual);
}
assAnswerBinaryStateTest::test_setGetState_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 40 of file assAnswerBinaryStateTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
$expected = 1;
$instance->setState($expected);
$actual = $instance->getState();
$this->assertEquals($expected, $actual);
}
assAnswerBinaryStateTest::test_setSet_shouldAlterState |
( |
| ) |
|
Definition at line 147 of file assAnswerBinaryStateTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
$expected = 0;
$instance->setState($expected);
$instance->setSet();
$actual = $instance->isStateUnchecked();
$this->assertEquals($expected, $actual);
}
assAnswerBinaryStateTest::test_setUnchecked_shouldAlterState |
( |
| ) |
|
Definition at line 131 of file assAnswerBinaryStateTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
$expected = 1;
$instance->setState($expected);
$instance->setUnchecked();
$actual = $instance->isStateUnchecked();
$this->assertEquals($expected, $actual);
}
assAnswerBinaryStateTest::test_setUnset_shouldAlterState |
( |
| ) |
|
Definition at line 163 of file assAnswerBinaryStateTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
$expected = 1;
$instance->setState($expected);
$instance->setUnset();
$actual = $instance->isStateUnchecked();
$this->assertEquals($expected, $actual);
}
Field Documentation
assAnswerBinaryStateTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: