ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
assAnswerBinaryStateImageTest.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.assAnswerBinaryStateImage.php';
33
34 // Act
35 $instance = new ASS_AnswerBinaryStateImage();
36
37 $this->assertInstanceOf('ASS_AnswerBinaryStateImage', $instance);
38 }
39
40 public function test_setGetImage()
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 }
52}
Class for answers with a binary state indicator.