ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
assAnswerImagemapTest Class Reference

Unit tests. More...

+ Inheritance diagram for assAnswerImagemapTest:
+ Collaboration diagram for assAnswerImagemapTest:

Public Member Functions

 test_instantiateObjectSimple ()
 test_setGetCoords ()
 test_setGetArea ()
 test_setGetPointsUnchecked ()
 test_setGetPointsUnchecked_shouldNullifyOnNonNumericPoints ()

Protected Member Functions

 setUp ()

Protected Attributes

 $backupGlobals = FALSE

Detailed Description

Unit tests.

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de

Definition at line 11 of file assAnswerImagemapTest.php.

Member Function Documentation

assAnswerImagemapTest::setUp ( )
protected

Definition at line 15 of file assAnswerImagemapTest.php.

{
if (defined('ILIAS_PHPUNIT_CONTEXT'))
{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
ilUnitUtil::performInitialisation();
}
else
{
chdir( dirname( __FILE__ ) );
chdir('../../../');
}
}
assAnswerImagemapTest::test_instantiateObjectSimple ( )

Definition at line 29 of file assAnswerImagemapTest.php.

{
// Arrange
require_once './Modules/TestQuestionPool/classes/class.assAnswerImagemap.php';
// Act
$instance = new ASS_AnswerImagemap();
// Assert
$this->assertInstanceOf('ASS_AnswerImagemap', $instance);
}
assAnswerImagemapTest::test_setGetArea ( )

Definition at line 56 of file assAnswerImagemapTest.php.

{
// Arrange
require_once './Modules/TestQuestionPool/classes/class.assAnswerImagemap.php';
$instance = new ASS_AnswerImagemap();
// Act
$expected = "12345";
$instance->setArea($expected);
$actual = $instance->getArea();
// Assert
$this->assertEquals($expected, $actual);
}
assAnswerImagemapTest::test_setGetCoords ( )

Definition at line 41 of file assAnswerImagemapTest.php.

{
// Arrange
require_once './Modules/TestQuestionPool/classes/class.assAnswerImagemap.php';
$instance = new ASS_AnswerImagemap();
// Act
$expected = "12345";
$instance->setCoords($expected);
$actual = $instance->getCoords();
// Assert
$this->assertEquals($expected, $actual);
}
assAnswerImagemapTest::test_setGetPointsUnchecked ( )

Definition at line 71 of file assAnswerImagemapTest.php.

{
// Arrange
require_once './Modules/TestQuestionPool/classes/class.assAnswerImagemap.php';
$instance = new ASS_AnswerImagemap();
// Act
$expected = "12345";
$instance->setPointsUnchecked($expected);
$actual = $instance->getPointsUnchecked();
// Assert
$this->assertEquals($expected, $actual);
}
assAnswerImagemapTest::test_setGetPointsUnchecked_shouldNullifyOnNonNumericPoints ( )

Definition at line 86 of file assAnswerImagemapTest.php.

{
// Arrange
require_once './Modules/TestQuestionPool/classes/class.assAnswerImagemap.php';
$instance = new ASS_AnswerImagemap();
// Act
$expected = 0.0;
$instance->setPointsUnchecked('Günther');
$actual = $instance->getPointsUnchecked();
// Assert
$this->assertEquals($expected, $actual);
}

Field Documentation

assAnswerImagemapTest::$backupGlobals = FALSE
protected

Definition at line 13 of file assAnswerImagemapTest.php.


The documentation for this class was generated from the following file: