Unit tests.
More...
Protected Member Functions |
| setUp () |
Detailed Description
Member Function Documentation
assAnswerBinaryStateTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 35 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 49 of file assAnswerBinaryStateTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
$this->assertInstanceOf('ASS_AnswerBinaryState', $instance);
}
assAnswerBinaryStateTest::test_isStateChecked_shouldReturnActualState |
( |
| ) |
|
Definition at line 75 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 91 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 123 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 107 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 138 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 60 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 170 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 154 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 186 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: