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

Public Member Functions

 setUp ()
 
 testBinaryComparisonOperation ($formula, $expectedResultExcel, $expectedResultOpenOffice)
 providerBinaryComparisonOperation More...
 
 providerBinaryComparisonOperation ()
 

Detailed Description

Definition at line 5 of file CalculationTest.php.

Member Function Documentation

◆ providerBinaryComparisonOperation()

CalculationTest::providerBinaryComparisonOperation ( )

Definition at line 32 of file CalculationTest.php.

33  {
34  return new testDataFileIterator('rawTestData/CalculationBinaryComparisonOperation.data');
35  }

◆ setUp()

CalculationTest::setUp ( )

Definition at line 8 of file CalculationTest.php.

References PHPExcel_Calculation_Functions\COMPATIBILITY_EXCEL, defined, and PHPExcel_Calculation_Functions\setCompatibilityMode().

9  {
10  if (!defined('PHPEXCEL_ROOT')) {
11  define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
12  }
13  require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
14 
16  }
const COMPATIBILITY_EXCEL
constants
Definition: Functions.php:62
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27
static setCompatibilityMode($compatibilityMode)
Definition: Functions.php:116
+ Here is the call graph for this function:

◆ testBinaryComparisonOperation()

CalculationTest::testBinaryComparisonOperation (   $formula,
  $expectedResultExcel,
  $expectedResultOpenOffice 
)

providerBinaryComparisonOperation

Definition at line 21 of file CalculationTest.php.

References PHPExcel_Calculation_Functions\COMPATIBILITY_EXCEL, PHPExcel_Calculation_Functions\COMPATIBILITY_OPENOFFICE, PHPExcel_Calculation\getInstance(), and PHPExcel_Calculation_Functions\setCompatibilityMode().

22  {
24  $resultExcel = \PHPExcel_Calculation::getInstance()->_calculateFormulaValue($formula);
25  $this->assertEquals($expectedResultExcel, $resultExcel, 'should be Excel compatible');
26 
28  $resultOpenOffice = \PHPExcel_Calculation::getInstance()->_calculateFormulaValue($formula);
29  $this->assertEquals($expectedResultOpenOffice, $resultOpenOffice, 'should be OpenOffice compatible');
30  }
const COMPATIBILITY_EXCEL
constants
Definition: Functions.php:62
static getInstance(PHPExcel $workbook=NULL)
Get an instance of this class.
static setCompatibilityMode($compatibilityMode)
Definition: Functions.php:116
+ Here is the call graph for this function:

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