ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
19  ilUnitUtil::performInitialisation();
20  } else {
21  chdir(dirname(__FILE__));
22  chdir('../../../');
23  }
24  }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

◆ test_instantiateObject_shouldReturnInstance()

assAnswerBinaryStateImageTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 26 of file assAnswerBinaryStateImageTest.php.

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

◆ test_setGetImage()

assAnswerBinaryStateImageTest::test_setGetImage ( )

Definition at line 37 of file assAnswerBinaryStateImageTest.php.

38  {
39  // Arrange
40  require_once './Modules/TestQuestionPool/classes/class.assAnswerBinaryStateImage.php';
41  $instance = new ASS_AnswerBinaryStateImage();
42  $expected = 'image';
43  // Act
44  $instance->setImage($expected);
45  $actual = $instance->getImage();
46 
47  $this->assertEquals($expected, $actual);
48  }
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: