ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
LegendTest Class Reference
+ Inheritance diagram for LegendTest:
+ Collaboration diagram for LegendTest:

Public Member Functions

 setUp ()
 
 testSetPosition ()
 
 testSetInvalidPositionReturnsFalse ()
 
 testGetPosition ()
 
 testSetPositionXL ()
 
 testSetInvalidXLPositionReturnsFalse ()
 
 testGetPositionXL ()
 
 testSetOverlay ()
 
 testSetInvalidOverlayReturnsFalse ()
 
 testGetOverlay ()
 

Detailed Description

Definition at line 4 of file LegendTest.php.

Member Function Documentation

◆ setUp()

LegendTest::setUp ( )

Definition at line 7 of file LegendTest.php.

8 {
9 if (!defined('PHPEXCEL_ROOT'))
10 {
11 define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
12 }
13 require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
14 }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

References defined.

◆ testGetOverlay()

LegendTest::testGetOverlay ( )

Definition at line 123 of file LegendTest.php.

124 {
125 $OverlayValue = TRUE;
126
127 $testInstance = new PHPExcel_Chart_Legend;
128 $setValue = $testInstance->setOverlay($OverlayValue);
129
130 $result = $testInstance->getOverlay();
131 $this->assertEquals($OverlayValue,$result);
132 }
$result
setOverlay($overlay=FALSE)
Set allow overlay of other elements?
Definition: Legend.php:153

References $result, and PHPExcel_Chart_Legend\setOverlay().

+ Here is the call graph for this function:

◆ testGetPosition()

LegendTest::testGetPosition ( )

Definition at line 45 of file LegendTest.php.

46 {
48
49 $testInstance = new PHPExcel_Chart_Legend;
50 $setValue = $testInstance->setPosition($PositionValue);
51
52 $result = $testInstance->getPosition();
53 $this->assertEquals($PositionValue,$result);
54 }
setPosition($position=self::POSITION_RIGHT)
Get legend position using an excel string value.
Definition: Legend.php:106

References $result, PHPExcel_Chart_Legend\POSITION_BOTTOM, and PHPExcel_Chart_Legend\setPosition().

+ Here is the call graph for this function:

◆ testGetPositionXL()

LegendTest::testGetPositionXL ( )

Definition at line 86 of file LegendTest.php.

87 {
89
90 $testInstance = new PHPExcel_Chart_Legend;
91 $setValue = $testInstance->setPositionXL($PositionValue);
92
93 $result = $testInstance->getPositionXL();
94 $this->assertEquals($PositionValue,$result);
95 }
const xlLegendPositionCorner
Definition: Legend.php:40
setPositionXL($positionXL=self::xlLegendPositionRight)
Set legend position using an Excel internal numeric value.
Definition: Legend.php:129

References $result, PHPExcel_Chart_Legend\setPositionXL(), and PHPExcel_Chart_Legend\xlLegendPositionCorner.

+ Here is the call graph for this function:

◆ testSetInvalidOverlayReturnsFalse()

LegendTest::testSetInvalidOverlayReturnsFalse ( )

Definition at line 112 of file LegendTest.php.

113 {
114 $testInstance = new PHPExcel_Chart_Legend;
115
116 $result = $testInstance->setOverlay('INVALID');
117 $this->assertFalse($result);
118
119 $result = $testInstance->getOverlay();
120 $this->assertFalse($result);
121 }

References $result.

◆ testSetInvalidPositionReturnsFalse()

LegendTest::testSetInvalidPositionReturnsFalse ( )

Definition at line 34 of file LegendTest.php.

35 {
36 $testInstance = new PHPExcel_Chart_Legend;
37
38 $result = $testInstance->setPosition('BottomLeft');
39 $this->assertFalse($result);
40 // Ensure that value is unchanged
41 $result = $testInstance->getPosition();
43 }

References $result, and PHPExcel_Chart_Legend\POSITION_RIGHT.

◆ testSetInvalidXLPositionReturnsFalse()

LegendTest::testSetInvalidXLPositionReturnsFalse ( )

Definition at line 75 of file LegendTest.php.

76 {
77 $testInstance = new PHPExcel_Chart_Legend;
78
79 $result = $testInstance->setPositionXL(999);
80 $this->assertFalse($result);
81 // Ensure that value is unchanged
82 $result = $testInstance->getPositionXL();
84 }
const xlLegendPositionRight
Definition: Legend.php:43

References $result, and PHPExcel_Chart_Legend\xlLegendPositionRight.

◆ testSetOverlay()

LegendTest::testSetOverlay ( )

Definition at line 97 of file LegendTest.php.

98 {
99 $overlayValues = array(
100 TRUE,
101 FALSE,
102 );
103
104 $testInstance = new PHPExcel_Chart_Legend;
105
106 foreach($overlayValues as $overlayValue) {
107 $result = $testInstance->setOverlay($overlayValue);
108 $this->assertTrue($result);
109 }
110 }

References $result.

◆ testSetPosition()

LegendTest::testSetPosition ( )

Definition at line 16 of file LegendTest.php.

17 {
18 $positionValues = array(
24 );
25
26 $testInstance = new PHPExcel_Chart_Legend;
27
28 foreach($positionValues as $positionValue) {
29 $result = $testInstance->setPosition($positionValue);
30 $this->assertTrue($result);
31 }
32 }
const POSITION_TOPRIGHT
Definition: Legend.php:50

References $result, PHPExcel_Chart_Legend\POSITION_BOTTOM, PHPExcel_Chart_Legend\POSITION_LEFT, PHPExcel_Chart_Legend\POSITION_RIGHT, PHPExcel_Chart_Legend\POSITION_TOP, and PHPExcel_Chart_Legend\POSITION_TOPRIGHT.

◆ testSetPositionXL()


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