Unit tests.
More...
Protected Member Functions |
| setUp () |
Detailed Description
Member Function Documentation
assNumericRangeTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assNumericRangeTest.php.
{
if (defined('ILIAS_PHPUNIT_CONTEXT'))
{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
ilUnitUtil::performInitialisation();
}
else
{
chdir( dirname( __FILE__ ) );
chdir('../../../');
}
}
assNumericRangeTest::test_contains_shouldReturnFalseIfValueIsHokum |
( |
| ) |
|
Definition at line 132 of file assNumericRangeTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assNumericRange.php';
$instance->setLowerLimit(1.00);
$instance->setUpperLimit(10.00);
$expected = false;
$actual = $instance->contains('Günther');
$this->assertEquals($expected, $actual);
}
assNumericRangeTest::test_contains_shouldReturnFalseIfValueIsNotContained |
( |
| ) |
|
Definition at line 116 of file assNumericRangeTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assNumericRange.php';
$instance->setLowerLimit(1.00);
$instance->setUpperLimit(10.00);
$expected = false;
$actual = $instance->contains(15.00);
$this->assertEquals($expected, $actual);
}
assNumericRangeTest::test_contains_shouldReturnTrueIfValueIsContained |
( |
| ) |
|
Definition at line 100 of file assNumericRangeTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assNumericRange.php';
$instance->setLowerLimit(1.00);
$instance->setUpperLimit(10.00);
$expected = true;
$actual = $instance->contains(5.00);
$this->assertEquals($expected, $actual);
}
assNumericRangeTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 29 of file assNumericRangeTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assNumericRange.php';
$this->assertInstanceOf('assNumericRange', $instance);
}
assNumericRangeTest::test_setGetLowerLimit_shouldReturnUnchangedLowerLimit |
( |
| ) |
|
Definition at line 40 of file assNumericRangeTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assNumericRange.php';
$expected = 1.00;
$instance->setLowerLimit($expected);
$actual = $instance->getLowerLimit();
$this->assertEquals($expected, $actual);
}
assNumericRangeTest::test_setGetOrder_shouldReturnUnchangedOrder |
( |
| ) |
|
Definition at line 70 of file assNumericRangeTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assNumericRange.php';
$expected = 10;
$instance->setOrder($expected);
$actual = $instance->getOrder();
$this->assertEquals($expected, $actual);
}
assNumericRangeTest::test_setGetUpperLimit_shouldReturnUnchangedUpperLimit |
( |
| ) |
|
Definition at line 55 of file assNumericRangeTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assNumericRange.php';
$expected = 10.00;
$instance->setUpperLimit($expected);
$actual = $instance->getUpperLimit();
$this->assertEquals($expected, $actual);
}
assNumericRangeTest::test_setPoints_shouldReturnUnchangedPoints |
( |
| ) |
|
Definition at line 85 of file assNumericRangeTest.php.
{
require_once './Modules/TestQuestionPool/classes/class.assNumericRange.php';
$expected = 10;
$instance->setPoints($expected);
$actual = $instance->getPoints();
$this->assertEquals($expected, $actual);
}
Field Documentation
assNumericRangeTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: