public function CalculationTest::testBinaryComparisonOperation in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/CalculationTest.php \CalculationTest::testBinaryComparisonOperation()
@dataProvider providerBinaryComparisonOperation
File
- vendor/
phpoffice/ phpexcel/ unitTests/ Classes/ PHPExcel/ CalculationTest.php, line 21
Class
Code
public function testBinaryComparisonOperation($formula, $expectedResultExcel, $expectedResultOpenOffice) {
PHPExcel_Calculation_Functions::setCompatibilityMode(PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL);
$resultExcel = \PHPExcel_Calculation::getInstance()
->_calculateFormulaValue($formula);
$this
->assertEquals($expectedResultExcel, $resultExcel, 'should be Excel compatible');
PHPExcel_Calculation_Functions::setCompatibilityMode(PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE);
$resultOpenOffice = \PHPExcel_Calculation::getInstance()
->_calculateFormulaValue($formula);
$this
->assertEquals($expectedResultOpenOffice, $resultOpenOffice, 'should be OpenOffice compatible');
}