ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
CalculationTest.php
Go to the documentation of this file.
1<?php
2
3require_once 'testDataFileIterator.php';
4
6{
7
8 public function setUp()
9 {
10 if (!defined('PHPEXCEL_ROOT')) {
11 define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
12 }
13 require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
14
16 }
17
21 public function testBinaryComparisonOperation($formula, $expectedResultExcel, $expectedResultOpenOffice)
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 }
31
33 {
34 return new testDataFileIterator('rawTestData/CalculationBinaryComparisonOperation.data');
35 }
36
37}
An exception for terminatinating execution or to throw for unit testing.
testBinaryComparisonOperation($formula, $expectedResultExcel, $expectedResultOpenOffice)
@dataProvider providerBinaryComparisonOperation
const COMPATIBILITY_EXCEL
constants
Definition: Functions.php:62
static setCompatibilityMode($compatibilityMode)
Definition: Functions.php:116
static getInstance(PHPExcel $workbook=NULL)
Get an instance of this class.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27