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.

References defined.

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

◆ testGetOverlay()

LegendTest::testGetOverlay ( )

Definition at line 123 of file LegendTest.php.

References $result, and PHPExcel_Chart_Legend\setOverlay().

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
+ Here is the call graph for this function:

◆ testGetPosition()

LegendTest::testGetPosition ( )

Definition at line 45 of file LegendTest.php.

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

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

◆ testGetPositionXL()

LegendTest::testGetPositionXL ( )

Definition at line 86 of file LegendTest.php.

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

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

◆ testSetInvalidOverlayReturnsFalse()

LegendTest::testSetInvalidOverlayReturnsFalse ( )

Definition at line 112 of file LegendTest.php.

References $result.

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  }
$result

◆ testSetInvalidPositionReturnsFalse()

LegendTest::testSetInvalidPositionReturnsFalse ( )

Definition at line 34 of file LegendTest.php.

References $result, and PHPExcel_Chart_Legend\POSITION_RIGHT.

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  }
$result

◆ testSetInvalidXLPositionReturnsFalse()

LegendTest::testSetInvalidXLPositionReturnsFalse ( )

Definition at line 75 of file LegendTest.php.

References $result, and PHPExcel_Chart_Legend\xlLegendPositionRight.

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  }
$result
const xlLegendPositionRight
Definition: Legend.php:43

◆ testSetOverlay()

LegendTest::testSetOverlay ( )

Definition at line 97 of file LegendTest.php.

References $result, and array.

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  }
$result
Create styles array
The data for the language used.

◆ testSetPosition()

LegendTest::testSetPosition ( )

Definition at line 16 of file LegendTest.php.

References $result, array, 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.

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  }
$result
const POSITION_TOPRIGHT
Definition: Legend.php:50
Create styles array
The data for the language used.

◆ testSetPositionXL()

LegendTest::testSetPositionXL ( )

Definition at line 56 of file LegendTest.php.

References $result, array, PHPExcel_Chart_Legend\xlLegendPositionBottom, PHPExcel_Chart_Legend\xlLegendPositionCorner, PHPExcel_Chart_Legend\xlLegendPositionCustom, PHPExcel_Chart_Legend\xlLegendPositionLeft, PHPExcel_Chart_Legend\xlLegendPositionRight, and PHPExcel_Chart_Legend\xlLegendPositionTop.

57  {
58  $positionValues = array(
65  );
66 
67  $testInstance = new PHPExcel_Chart_Legend;
68 
69  foreach($positionValues as $positionValue) {
70  $result = $testInstance->setPositionXL($positionValue);
71  $this->assertTrue($result);
72  }
73  }
$result
const xlLegendPositionCorner
Definition: Legend.php:40
const xlLegendPositionBottom
Legend positions.
Definition: Legend.php:39
const xlLegendPositionCustom
Definition: Legend.php:41
const xlLegendPositionRight
Definition: Legend.php:43
Create styles array
The data for the language used.
const xlLegendPositionTop
Definition: Legend.php:44
const xlLegendPositionLeft
Definition: Legend.php:42

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