ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
assAnswerBinaryStateImageTest Class Reference

Unit tests. More...

+ Inheritance diagram for assAnswerBinaryStateImageTest:
+ Collaboration diagram for assAnswerBinaryStateImageTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 test_setGetImage ()
 

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 assAnswerBinaryStateImageTest.php.

Member Function Documentation

◆ setUp()

assAnswerBinaryStateImageTest::setUp ( )
protected

Definition at line 15 of file assAnswerBinaryStateImageTest.php.

References defined.

16  {
17  if (defined('ILIAS_PHPUNIT_CONTEXT'))
18  {
19  include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
20  ilUnitUtil::performInitialisation();
21  }
22  else
23  {
24  chdir( dirname( __FILE__ ) );
25  chdir('../../../');
26  }
27  }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

◆ test_instantiateObject_shouldReturnInstance()

assAnswerBinaryStateImageTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 29 of file assAnswerBinaryStateImageTest.php.

30  {
31  // Arrange
32  require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryStateImage.php';
33 
34  // Act
35  $instance = new ASS_AnswerBinaryStateImage();
36 
37  $this->assertInstanceOf('ASS_AnswerBinaryStateImage', $instance);
38  }
Class for answers with a binary state indicator.

◆ test_setGetImage()

assAnswerBinaryStateImageTest::test_setGetImage ( )

Definition at line 40 of file assAnswerBinaryStateImageTest.php.

41  {
42  // Arrange
43  require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryStateImage.php';
44  $instance = new ASS_AnswerBinaryStateImage();
45  $expected = 'image';
46  // Act
47  $instance->setImage($expected);
48  $actual = $instance->getImage();
49 
50  $this->assertEquals($expected, $actual );
51  }
Class for answers with a binary state indicator.

Field Documentation

◆ $backupGlobals

assAnswerBinaryStateImageTest::$backupGlobals = FALSE
protected

Definition at line 13 of file assAnswerBinaryStateImageTest.php.


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