ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
assAnswerMultipleResponseImageTest.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
12 {
13  protected $backupGlobals = FALSE;
14 
15  protected function setUp()
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  }
28 
30  {
31  // Arrange
32  require_once './Modules/TestQuestionPool/classes/class.assAnswerMultipleResponseImage.php';
33 
34  // Act
35  $instance = new ASS_AnswerMultipleResponseImage();
36 
37  $this->assertInstanceOf('ASS_AnswerMultipleResponseImage', $instance);
38  }
39 
40  public function test_setGetImage()
41  {
42  // Arrange
43  require_once './Modules/TestQuestionPool/classes/class.assAnswerMultipleResponseImage.php';
44  $instance = new ASS_AnswerMultipleResponseImage();
45  $expected = 'c:\image.jpg';
46 
47  // Act
48  $instance->setImage($expected);
49  $actual = $instance->getImage();
50 
51  // Assert
52  $this->assertEquals($expected, $actual);
53  }
54 }
ASS_AnswerBinaryStateImage is a class for answers with a binary state indicator (checked/unchecked, set/unset) and an image file.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27