From 70b4ecd4d3d11424d5f096bfff9978cc3c7b5bef Mon Sep 17 00:00:00 2001 From: oleibman <10341515+oleibman@users.noreply.github.com> Date: Thu, 13 Nov 2025 20:48:46 -0800 Subject: [PATCH] Use `calculateFormula` Rather Than `_calculateFormulaValue` in Tests They aren't quite interchangeable. Both are used in the test suite, with no indication of why one or the other. I think we'd be best off being consistent. Based on the names, I think `_calculateFormulaValue` was intended as a private, or at least internal, method, so favor `calculateFormula`. I do not intend to rename or re-categorize `_calculateFormulaValue`, just remove its usage when it isn't clearly warranted. --- .../Calculation/Functions/DateTime/DateDifTest.php | 4 ++-- .../Calculation/Functions/DateTime/DateTest.php | 6 +++--- .../Calculation/Functions/DateTime/DateValueTest.php | 4 ++-- .../Calculation/Functions/DateTime/DayTest.php | 6 +++--- .../Calculation/Functions/DateTime/Days360Test.php | 4 ++-- .../Calculation/Functions/DateTime/DaysTest.php | 4 ++-- .../Calculation/Functions/DateTime/EDateTest.php | 4 ++-- .../Calculation/Functions/DateTime/EoMonthTest.php | 4 ++-- .../Calculation/Functions/DateTime/HourTest.php | 4 ++-- .../Calculation/Functions/DateTime/IsoWeekNumTest.php | 4 ++-- .../Calculation/Functions/DateTime/MinuteTest.php | 4 ++-- .../Calculation/Functions/DateTime/MonthTest.php | 4 ++-- .../Calculation/Functions/DateTime/NetworkDaysTest.php | 4 ++-- .../Calculation/Functions/DateTime/NowTest.php | 2 +- .../Calculation/Functions/DateTime/SecondTest.php | 4 ++-- .../Calculation/Functions/DateTime/TimeTest.php | 6 +++--- .../Calculation/Functions/DateTime/TimeValueTest.php | 4 ++-- .../Calculation/Functions/DateTime/TodayTest.php | 2 +- .../Calculation/Functions/DateTime/WeekDayTest.php | 4 ++-- .../Calculation/Functions/DateTime/WeekNumTest.php | 4 ++-- .../Calculation/Functions/DateTime/WorkDayTest.php | 4 ++-- .../Calculation/Functions/DateTime/YearFracTest.php | 4 ++-- .../Calculation/Functions/DateTime/YearTest.php | 4 ++-- .../Calculation/Functions/Information/ErrorTypeTest.php | 9 +++++---- .../Calculation/Functions/Information/IsBlankTest.php | 9 +++++---- .../Calculation/Functions/Information/IsErrTest.php | 9 +++++---- .../Calculation/Functions/Information/IsErrorTest.php | 9 +++++---- .../Calculation/Functions/Information/IsEvenTest.php | 9 +++++---- .../Calculation/Functions/Information/IsFormulaTest.php | 4 ++-- .../Calculation/Functions/Information/IsLogicalTest.php | 9 +++++---- .../Calculation/Functions/Information/IsNaTest.php | 9 +++++---- .../Calculation/Functions/Information/IsNonTextTest.php | 9 +++++---- .../Calculation/Functions/Information/IsNumberTest.php | 9 +++++---- .../Calculation/Functions/Information/IsOddTest.php | 9 +++++---- .../Calculation/Functions/Information/IsTextTest.php | 9 +++++---- .../Calculation/Functions/Logical/IfErrorTest.php | 9 +++++---- .../Calculation/Functions/Logical/IfNaTest.php | 9 +++++---- .../Calculation/Functions/Logical/IfsTest.php | 9 +++++---- .../Calculation/Functions/Logical/NotTest.php | 9 +++++---- .../Calculation/Functions/Logical/SwitchTest.php | 9 +++++---- .../Calculation/Functions/LookupRef/AddressTest.php | 9 +++++---- .../Calculation/Functions/LookupRef/ChooseTest.php | 4 ++-- .../Calculation/Functions/LookupRef/ColumnsTest.php | 4 ++-- .../Calculation/Functions/LookupRef/HLookupTest.php | 4 ++-- .../Calculation/Functions/LookupRef/IndexTest.php | 9 +++++---- .../Calculation/Functions/LookupRef/LookupTest.php | 9 +++++---- .../Calculation/Functions/LookupRef/MatchTest.php | 6 +++--- .../Calculation/Functions/LookupRef/RowsTest.php | 4 ++-- .../Calculation/Functions/LookupRef/VLookupTest.php | 4 ++-- .../Calculation/Functions/MathTrig/AbsTest.php | 2 +- .../Calculation/Functions/MathTrig/AcosTest.php | 2 +- .../Calculation/Functions/MathTrig/AcoshTest.php | 2 +- .../Calculation/Functions/MathTrig/AcotTest.php | 2 +- .../Calculation/Functions/MathTrig/AcothTest.php | 2 +- .../Calculation/Functions/MathTrig/ArabicTest.php | 2 +- .../Calculation/Functions/MathTrig/AsinTest.php | 2 +- .../Calculation/Functions/MathTrig/AsinhTest.php | 2 +- .../Calculation/Functions/MathTrig/Atan2Test.php | 2 +- .../Calculation/Functions/MathTrig/AtanTest.php | 2 +- .../Calculation/Functions/MathTrig/AtanhTest.php | 2 +- .../Calculation/Functions/MathTrig/BaseTest.php | 2 +- .../Calculation/Functions/MathTrig/CeilingMathTest.php | 2 +- .../Functions/MathTrig/CeilingPreciseTest.php | 2 +- .../Calculation/Functions/MathTrig/CeilingTest.php | 2 +- .../Calculation/Functions/MathTrig/CombinATest.php | 2 +- .../Calculation/Functions/MathTrig/CombinTest.php | 2 +- .../Calculation/Functions/MathTrig/CosTest.php | 2 +- .../Calculation/Functions/MathTrig/CoshTest.php | 2 +- .../Calculation/Functions/MathTrig/CotTest.php | 2 +- .../Calculation/Functions/MathTrig/CothTest.php | 2 +- .../Calculation/Functions/MathTrig/CscTest.php | 2 +- .../Calculation/Functions/MathTrig/CschTest.php | 2 +- .../Calculation/Functions/MathTrig/DegreesTest.php | 2 +- .../Calculation/Functions/MathTrig/EvenTest.php | 2 +- .../Calculation/Functions/MathTrig/ExpTest.php | 2 +- .../Calculation/Functions/MathTrig/FactDoubleTest.php | 2 +- .../Calculation/Functions/MathTrig/FactTest.php | 2 +- .../Calculation/Functions/MathTrig/FloorMathTest.php | 2 +- .../Calculation/Functions/MathTrig/FloorPreciseTest.php | 2 +- .../Calculation/Functions/MathTrig/FloorTest.php | 2 +- .../Calculation/Functions/MathTrig/IntTest.php | 2 +- .../Calculation/Functions/MathTrig/LnTest.php | 2 +- .../Calculation/Functions/MathTrig/Log10Test.php | 2 +- .../Calculation/Functions/MathTrig/LogTest.php | 2 +- .../Calculation/Functions/MathTrig/MRoundTest.php | 2 +- .../Calculation/Functions/MathTrig/ModTest.php | 2 +- .../Calculation/Functions/MathTrig/OddTest.php | 2 +- .../Calculation/Functions/MathTrig/PowerTest.php | 2 +- .../Calculation/Functions/MathTrig/QuotientTest.php | 2 +- .../Calculation/Functions/MathTrig/RadiansTest.php | 2 +- .../Calculation/Functions/MathTrig/RandBetweenTest.php | 2 +- .../Calculation/Functions/MathTrig/RomanTest.php | 2 +- .../Calculation/Functions/MathTrig/RoundDownTest.php | 2 +- .../Calculation/Functions/MathTrig/RoundTest.php | 2 +- .../Calculation/Functions/MathTrig/RoundUpTest.php | 2 +- .../Calculation/Functions/MathTrig/SecTest.php | 2 +- .../Calculation/Functions/MathTrig/SechTest.php | 2 +- .../Calculation/Functions/MathTrig/SeriesSumTest.php | 2 +- .../Calculation/Functions/MathTrig/SignTest.php | 2 +- .../Calculation/Functions/MathTrig/SinTest.php | 2 +- .../Calculation/Functions/MathTrig/SinhTest.php | 2 +- .../Calculation/Functions/MathTrig/SqrtPiTest.php | 2 +- .../Calculation/Functions/MathTrig/SqrtTest.php | 2 +- .../Calculation/Functions/MathTrig/TanTest.php | 2 +- .../Calculation/Functions/MathTrig/TanhTest.php | 2 +- .../Calculation/Functions/MathTrig/TruncTest.php | 2 +- .../Calculation/Functions/Statistical/BetaDistTest.php | 2 +- .../Calculation/Functions/Statistical/BetaInvTest.php | 2 +- .../Functions/Statistical/BinomDistRangeTest.php | 2 +- .../Calculation/Functions/Statistical/BinomDistTest.php | 2 +- .../Calculation/Functions/Statistical/BinomInvTest.php | 2 +- .../Functions/Statistical/ChiDistLeftTailTest.php | 2 +- .../Functions/Statistical/ChiDistRightTailTest.php | 2 +- .../Functions/Statistical/ChiInvLeftTailTest.php | 6 +++--- .../Functions/Statistical/ChiInvRightTailTest.php | 6 +++--- .../Calculation/Functions/Statistical/ConfidenceTest.php | 2 +- .../Calculation/Functions/Statistical/ExponDistTest.php | 2 +- .../Calculation/Functions/Statistical/FDistTest.php | 2 +- .../Calculation/Functions/Statistical/FisherInvTest.php | 2 +- .../Calculation/Functions/Statistical/FisherTest.php | 2 +- .../Calculation/Functions/Statistical/ForecastTest.php | 2 +- .../Calculation/Functions/Statistical/GammaDistTest.php | 2 +- .../Calculation/Functions/Statistical/GammaInvTest.php | 2 +- .../Calculation/Functions/Statistical/GammaLnTest.php | 2 +- .../Calculation/Functions/Statistical/GammaTest.php | 2 +- .../Calculation/Functions/Statistical/GaussTest.php | 2 +- .../Functions/Statistical/HypGeomDistTest.php | 2 +- .../Calculation/Functions/Statistical/LogInvTest.php | 2 +- .../Functions/Statistical/LogNormDist2Test.php | 2 +- .../Functions/Statistical/LogNormDistTest.php | 2 +- .../Functions/Statistical/NegBinomDistTest.php | 2 +- .../Calculation/Functions/Statistical/NormDistTest.php | 2 +- .../Calculation/Functions/Statistical/NormInvTest.php | 2 +- .../Calculation/Functions/Statistical/NormSDist2Test.php | 2 +- .../Calculation/Functions/Statistical/NormSDistTest.php | 2 +- .../Calculation/Functions/Statistical/NormSInvTest.php | 2 +- .../Calculation/Functions/Statistical/PermutTest.php | 2 +- .../Functions/Statistical/PermutationATest.php | 2 +- .../Calculation/Functions/Statistical/PoissonTest.php | 2 +- .../Functions/Statistical/StandardizeTest.php | 2 +- .../Calculation/Functions/Statistical/TDistTest.php | 2 +- .../Calculation/Functions/Statistical/TinvTest.php | 2 +- .../Calculation/Functions/Statistical/WeibullTest.php | 2 +- .../Calculation/Functions/Statistical/ZTestTest.php | 2 +- .../Calculation/Functions/TextData/CharTest.php | 4 ++-- .../Calculation/Functions/TextData/CleanTest.php | 4 ++-- .../Calculation/Functions/TextData/CodeTest.php | 4 ++-- .../Calculation/Functions/TextData/DollarTest.php | 4 ++-- .../Calculation/Functions/TextData/ExactTest.php | 4 ++-- .../Calculation/Functions/TextData/FindTest.php | 4 ++-- .../Calculation/Functions/TextData/FixedTest.php | 4 ++-- .../Calculation/Functions/TextData/LeftTest.php | 4 ++-- .../Calculation/Functions/TextData/LenTest.php | 4 ++-- .../Calculation/Functions/TextData/LowerTest.php | 4 ++-- .../Calculation/Functions/TextData/MidTest.php | 4 ++-- .../Calculation/Functions/TextData/NumberValueTest.php | 2 +- .../Calculation/Functions/TextData/ProperTest.php | 4 ++-- .../Calculation/Functions/TextData/ReplaceTest.php | 4 ++-- .../Calculation/Functions/TextData/ReptTest.php | 4 ++-- .../Calculation/Functions/TextData/RightTest.php | 4 ++-- .../Calculation/Functions/TextData/SearchTest.php | 4 ++-- .../Calculation/Functions/TextData/SubstituteTest.php | 4 ++-- .../Calculation/Functions/TextData/TTest.php | 2 +- .../Calculation/Functions/TextData/TextJoinTest.php | 4 ++-- .../Calculation/Functions/TextData/TextTest.php | 4 ++-- .../Calculation/Functions/TextData/TrimTest.php | 4 ++-- .../Calculation/Functions/TextData/UpperTest.php | 4 ++-- .../Calculation/Functions/TextData/ValueTest.php | 2 +- 168 files changed, 301 insertions(+), 282 deletions(-) diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateDifTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateDifTest.php index 14d564d67..5caa3a10c 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateDifTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateDifTest.php @@ -33,7 +33,7 @@ class DateDifTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=DATEDIF({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -104,7 +104,7 @@ class DateDifTest extends TestCase } else { $formula = "=DATEDIF({$startDate}, {$endDate}, {$methods})"; } - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateTest.php index d31485173..f80e9b649 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateTest.php @@ -53,7 +53,7 @@ class DateTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=DATE({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -144,7 +144,7 @@ class DateTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=DATE({$year}, {$month}, {$day})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } @@ -211,7 +211,7 @@ class DateTest extends TestCase $this->expectExceptionMessage('Formulae with more than two array arguments are not supported'); $formula = "=DATE({$year}, {$month}, {$day})"; - $calculation->_calculateFormulaValue($formula); + $calculation->calculateFormula($formula); } public static function providerDateArrayException(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateValueTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateValueTest.php index 0d926f89f..856b4dee8 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateValueTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateValueTest.php @@ -78,7 +78,7 @@ class DateValueTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=DATEVALUE({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8); } @@ -182,7 +182,7 @@ class DateValueTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=DATEVALUE({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DayTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DayTest.php index a1f4a6de9..04c10c96c 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DayTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DayTest.php @@ -46,7 +46,7 @@ class DayTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=DAY({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResultExcel, $result); } @@ -92,7 +92,7 @@ class DayTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=DAY({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResultOpenOffice, $result); } @@ -140,7 +140,7 @@ class DayTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=DAY({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/Days360Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/Days360Test.php index 6a09c3477..d53215974 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/Days360Test.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/Days360Test.php @@ -32,7 +32,7 @@ class Days360Test extends TestCase $calculation = Calculation::getInstance(); $formula = "=DAYS360({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -103,7 +103,7 @@ class Days360Test extends TestCase } else { $formula = "=DAYS360({$startDate}, {$endDate}, {$methods})"; } - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DaysTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DaysTest.php index 18a0ef7d1..3b9d34e96 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DaysTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DaysTest.php @@ -31,7 +31,7 @@ class DaysTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=DAYS({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -98,7 +98,7 @@ class DaysTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=DAYS({$startDate}, {$endDate})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EDateTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EDateTest.php index 41c83d7bc..a7697ca03 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EDateTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EDateTest.php @@ -47,7 +47,7 @@ class EDateTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=EDATE({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -129,7 +129,7 @@ class EDateTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=EDATE({$dateValues}, {$methods})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EoMonthTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EoMonthTest.php index 9cd51cac0..b2c2a5703 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EoMonthTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EoMonthTest.php @@ -47,7 +47,7 @@ class EoMonthTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=EOMONTH({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -128,7 +128,7 @@ class EoMonthTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=EOMONTH({$dateValues}, {$methods})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/HourTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/HourTest.php index 3f6efdc4a..e8ecc510b 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/HourTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/HourTest.php @@ -29,7 +29,7 @@ class HourTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=HOUR({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -89,7 +89,7 @@ class HourTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=HOUR({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/IsoWeekNumTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/IsoWeekNumTest.php index 010197ba9..93e434a20 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/IsoWeekNumTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/IsoWeekNumTest.php @@ -46,7 +46,7 @@ class IsoWeekNumTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=ISOWEEKNUM({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -120,7 +120,7 @@ class IsoWeekNumTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=ISOWEEKNUM({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MinuteTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MinuteTest.php index 865e5cbf8..a29c208c4 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MinuteTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MinuteTest.php @@ -29,7 +29,7 @@ class MinuteTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=MINUTE({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -89,7 +89,7 @@ class MinuteTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=MINUTE({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MonthTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MonthTest.php index 7dbb2b5ea..68b67ff48 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MonthTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MonthTest.php @@ -29,7 +29,7 @@ class MonthTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=MONTH({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -89,7 +89,7 @@ class MonthTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=MONTH({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NetworkDaysTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NetworkDaysTest.php index bb20d0add..1ef880abd 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NetworkDaysTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NetworkDaysTest.php @@ -28,7 +28,7 @@ class NetworkDaysTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=NETWORKDAYS({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -93,7 +93,7 @@ class NetworkDaysTest extends TestCase } else { $formula = "=NETWORKDAYS({$startDate}, {$endDays}, {$holidays})"; } - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NowTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NowTest.php index c69239157..c26ff3272 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NowTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NowTest.php @@ -47,7 +47,7 @@ class NowTest extends TestCase do { $dtStart = new DateTimeImmutable(); $startSecond = $dtStart->format('s'); - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); $endSecond = (new DateTimeImmutable('now'))->format('s'); } while ($startSecond !== $endSecond); diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/SecondTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/SecondTest.php index e59dcba76..c54067cce 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/SecondTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/SecondTest.php @@ -28,7 +28,7 @@ class SecondTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=SECOND({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -88,7 +88,7 @@ class SecondTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=SECOND({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeTest.php index b121c35bd..798f10357 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeTest.php @@ -53,7 +53,7 @@ class TimeTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=TIME({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12); } @@ -129,7 +129,7 @@ class TimeTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=TIME({$hour}, {$minute}, {$second})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } @@ -196,7 +196,7 @@ class TimeTest extends TestCase $this->expectExceptionMessage('Formulae with more than two array arguments are not supported'); $formula = "=TIME({$hour}, {$minute}, {$second})"; - $calculation->_calculateFormulaValue($formula); + $calculation->calculateFormula($formula); } public static function providerTimeArrayException(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeValueTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeValueTest.php index 55370dccb..d53680a12 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeValueTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeValueTest.php @@ -47,7 +47,7 @@ class TimeValueTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=TIMEVALUE({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8); } @@ -137,7 +137,7 @@ class TimeValueTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=TIMEVALUE({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TodayTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TodayTest.php index 006ac6bb9..5d2228277 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TodayTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TodayTest.php @@ -47,7 +47,7 @@ class TodayTest extends TestCase do { $dtStart = new DateTimeImmutable(); $startSecond = $dtStart->format('s'); - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); $endSecond = (new DateTimeImmutable('now'))->format('s'); } while ($startSecond !== $endSecond); diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekDayTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekDayTest.php index 51927df65..6880ecb3e 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekDayTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekDayTest.php @@ -45,7 +45,7 @@ class WeekDayTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=WEEKDAY({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -114,7 +114,7 @@ class WeekDayTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=WEEKDAY({$dateValues}, {$styles})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekNumTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekNumTest.php index 4be935efd..e21453e87 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekNumTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekNumTest.php @@ -46,7 +46,7 @@ class WeekNumTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=WEEKNUM({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -120,7 +120,7 @@ class WeekNumTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=WEEKNUM({$dateValues}, {$methods})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WorkDayTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WorkDayTest.php index d2f39854e..aaf80f89c 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WorkDayTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WorkDayTest.php @@ -28,7 +28,7 @@ class WorkDayTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=WORKDAY({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -92,7 +92,7 @@ class WorkDayTest extends TestCase } else { $formula = "=WORKDAY({$startDate}, {$endDays}, {$holidays})"; } - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearFracTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearFracTest.php index d12f55070..579631fd2 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearFracTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearFracTest.php @@ -29,7 +29,7 @@ class YearFracTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=YEARFRAC({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6); } @@ -94,7 +94,7 @@ class YearFracTest extends TestCase } else { $formula = "=YEARFRAC({$startDate}, {$endDate}, {$methods})"; } - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearTest.php index 35a423868..7b86b3baa 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearTest.php @@ -28,7 +28,7 @@ class YearTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=YEAR({$arguments})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } @@ -88,7 +88,7 @@ class YearTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=YEAR({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/ErrorTypeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/ErrorTypeTest.php index eae76a1a6..e6352bf26 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/ErrorTypeTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/ErrorTypeTest.php @@ -6,6 +6,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class ErrorTypeTest extends TestCase @@ -16,7 +17,7 @@ class ErrorTypeTest extends TestCase self::assertSame(ExcelError::NA(), $result); } - #[\PHPUnit\Framework\Attributes\DataProvider('providerErrorType')] + #[DataProvider('providerErrorType')] public function testErrorType(int|string $expectedResult, mixed $value): void { $result = ExcelError::type($value); @@ -28,14 +29,14 @@ class ErrorTypeTest extends TestCase return require 'tests/data/Calculation/Information/ERROR_TYPE.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerErrorTypeArray')] + #[DataProvider('providerErrorTypeArray')] public function testErrorTypeArray(array $expectedResult, string $values): void { $calculation = Calculation::getInstance(); $formula = "=ERROR.TYPE({$values})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerErrorTypeArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsBlankTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsBlankTest.php index 495798fd6..16b529741 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsBlankTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsBlankTest.php @@ -6,6 +6,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Information\Value; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IsBlankTest extends TestCase @@ -16,7 +17,7 @@ class IsBlankTest extends TestCase self::assertTrue($result); } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsBlank')] + #[DataProvider('providerIsBlank')] public function testIsBlank(bool $expectedResult, mixed $value): void { $result = Value::isBlank($value); @@ -28,14 +29,14 @@ class IsBlankTest extends TestCase return require 'tests/data/Calculation/Information/IS_BLANK.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsBlankArray')] + #[DataProvider('providerIsBlankArray')] public function testIsBlankArray(array $expectedResult, string $values): void { $calculation = Calculation::getInstance(); $formula = "=ISBLANK({$values})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIsBlankArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrTest.php index 5b93149fb..2652276fc 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrTest.php @@ -6,6 +6,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IsErrTest extends TestCase @@ -16,7 +17,7 @@ class IsErrTest extends TestCase self::assertFalse($result); } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsErr')] + #[DataProvider('providerIsErr')] public function testIsErr(bool $expectedResult, mixed $value): void { $result = ErrorValue::isErr($value); @@ -28,14 +29,14 @@ class IsErrTest extends TestCase return require 'tests/data/Calculation/Information/IS_ERR.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsErrArray')] + #[DataProvider('providerIsErrArray')] public function testIsErrArray(array $expectedResult, string $values): void { $calculation = Calculation::getInstance(); $formula = "=ISERR({$values})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIsErrArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrorTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrorTest.php index 526a379cb..36a841cd4 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrorTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrorTest.php @@ -6,6 +6,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IsErrorTest extends TestCase @@ -16,7 +17,7 @@ class IsErrorTest extends TestCase self::assertFalse($result); } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsError')] + #[DataProvider('providerIsError')] public function testIsError(bool $expectedResult, mixed $value): void { $result = ErrorValue::isError($value); @@ -28,14 +29,14 @@ class IsErrorTest extends TestCase return require 'tests/data/Calculation/Information/IS_ERROR.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsErrorArray')] + #[DataProvider('providerIsErrorArray')] public function testIsErrorArray(array $expectedResult, string $values): void { $calculation = Calculation::getInstance(); $formula = "=ISERROR({$values})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIsErrorArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsEvenTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsEvenTest.php index c8293d6df..a081a500b 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsEvenTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsEvenTest.php @@ -7,6 +7,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; use PhpOffice\PhpSpreadsheet\Calculation\Information\Value; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IsEvenTest extends TestCase @@ -17,7 +18,7 @@ class IsEvenTest extends TestCase self::assertSame(ExcelError::NAME(), $result); } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsEven')] + #[DataProvider('providerIsEven')] public function testIsEven(bool|string $expectedResult, mixed $value): void { $result = Value::isEven($value); @@ -29,14 +30,14 @@ class IsEvenTest extends TestCase return require 'tests/data/Calculation/Information/IS_EVEN.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsEvenArray')] + #[DataProvider('providerIsEvenArray')] public function testIsEvenArray(array $expectedResult, string $values): void { $calculation = Calculation::getInstance(); $formula = "=ISEVEN({$values})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIsEvenArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsFormulaTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsFormulaTest.php index 2b5e0953c..bfb988b2b 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsFormulaTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsFormulaTest.php @@ -114,8 +114,8 @@ class IsFormulaTest extends TestCase $calculation = Calculation::getInstance($spreadsheet); $formula = '=ISFORMULA(A1:A7)'; - $result = $calculation->_calculateFormulaValue($formula, 'C1', $sheet->getCell('C1')); - self::assertEquals([true, false, true, false, true, false, false], $result); + $result = $calculation->calculateFormula($formula, 'C1', $sheet->getCell('C1')); + self::assertSame([true, false, true, false, true, false, false], $result); $spreadsheet->disconnectWorksheets(); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsLogicalTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsLogicalTest.php index e00cccb3b..206e12010 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsLogicalTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsLogicalTest.php @@ -6,6 +6,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Information\Value; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IsLogicalTest extends TestCase @@ -16,7 +17,7 @@ class IsLogicalTest extends TestCase self::assertFalse($result); } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsLogical')] + #[DataProvider('providerIsLogical')] public function testIsLogical(bool $expectedResult, mixed $value): void { $result = Value::isLogical($value); @@ -28,14 +29,14 @@ class IsLogicalTest extends TestCase return require 'tests/data/Calculation/Information/IS_LOGICAL.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsLogicalArray')] + #[DataProvider('providerIsLogicalArray')] public function testIsLogicalArray(array $expectedResult, string $values): void { $calculation = Calculation::getInstance(); $formula = "=ISLOGICAL({$values})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIsLogicalArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNaTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNaTest.php index 72b841367..97f6131c8 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNaTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNaTest.php @@ -6,6 +6,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Information\ErrorValue; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IsNaTest extends TestCase @@ -16,7 +17,7 @@ class IsNaTest extends TestCase self::assertFalse($result); } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNa')] + #[DataProvider('providerIsNa')] public function testIsNa(bool $expectedResult, mixed $value): void { $result = ErrorValue::isNa($value); @@ -28,14 +29,14 @@ class IsNaTest extends TestCase return require 'tests/data/Calculation/Information/IS_NA.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNaArray')] + #[DataProvider('providerIsNaArray')] public function testIsNaArray(array $expectedResult, string $values): void { $calculation = Calculation::getInstance(); $formula = "=ISNA({$values})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIsNaArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNonTextTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNonTextTest.php index c639c93a5..c603fa27a 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNonTextTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNonTextTest.php @@ -6,6 +6,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Information\Value; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IsNonTextTest extends TestCase @@ -16,7 +17,7 @@ class IsNonTextTest extends TestCase self::assertTrue($result); } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNonText')] + #[DataProvider('providerIsNonText')] public function testIsNonText(bool $expectedResult, mixed $value): void { $result = Value::isNonText($value); @@ -28,14 +29,14 @@ class IsNonTextTest extends TestCase return require 'tests/data/Calculation/Information/IS_NONTEXT.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNonTextArray')] + #[DataProvider('providerIsNonTextArray')] public function testIsNonTextArray(array $expectedResult, string $values): void { $calculation = Calculation::getInstance(); $formula = "=ISNONTEXT({$values})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIsNonTextArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNumberTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNumberTest.php index 180fbc22d..d5cbe286a 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNumberTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNumberTest.php @@ -6,6 +6,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Information\Value; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IsNumberTest extends TestCase @@ -16,7 +17,7 @@ class IsNumberTest extends TestCase self::assertFalse($result); } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNumber')] + #[DataProvider('providerIsNumber')] public function testIsNumber(bool $expectedResult, mixed $value): void { $result = Value::isNumber($value); @@ -28,14 +29,14 @@ class IsNumberTest extends TestCase return require 'tests/data/Calculation/Information/IS_NUMBER.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNumberArray')] + #[DataProvider('providerIsNumberArray')] public function testIsNumberArray(array $expectedResult, string $values): void { $calculation = Calculation::getInstance(); $formula = "=ISNUMBER({$values})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIsNumberArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsOddTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsOddTest.php index 6ff3d6ec3..c493f79e0 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsOddTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsOddTest.php @@ -7,6 +7,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; use PhpOffice\PhpSpreadsheet\Calculation\Information\Value; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IsOddTest extends TestCase @@ -17,7 +18,7 @@ class IsOddTest extends TestCase self::assertSame(ExcelError::NAME(), $result); } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsOdd')] + #[DataProvider('providerIsOdd')] public function testIsOdd(bool|string $expectedResult, mixed $value): void { $result = Value::isOdd($value); @@ -29,14 +30,14 @@ class IsOddTest extends TestCase return require 'tests/data/Calculation/Information/IS_ODD.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsOddArray')] + #[DataProvider('providerIsOddArray')] public function testIsOddArray(array $expectedResult, string $values): void { $calculation = Calculation::getInstance(); $formula = "=ISODD({$values})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIsOddArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsTextTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsTextTest.php index f75e2ff17..b42e8278f 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsTextTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsTextTest.php @@ -6,6 +6,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Information; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Information\Value; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IsTextTest extends TestCase @@ -16,7 +17,7 @@ class IsTextTest extends TestCase self::assertFalse($result); } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsText')] + #[DataProvider('providerIsText')] public function testIsText(bool $expectedResult, mixed $value): void { $result = Value::isText($value); @@ -28,14 +29,14 @@ class IsTextTest extends TestCase return require 'tests/data/Calculation/Information/IS_TEXT.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIsTextArray')] + #[DataProvider('providerIsTextArray')] public function testIsTextArray(array $expectedResult, string $values): void { $calculation = Calculation::getInstance(); $formula = "=ISTEXT({$values})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIsTextArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfErrorTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfErrorTest.php index adb98070d..004e3bd64 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfErrorTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfErrorTest.php @@ -5,10 +5,11 @@ declare(strict_types=1); namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Logical; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; +use PHPUnit\Framework\Attributes\DataProvider; class IfErrorTest extends AllSetupTeardown { - #[\PHPUnit\Framework\Attributes\DataProvider('providerIFERROR')] + #[DataProvider('providerIFERROR')] public function testIFERROR(mixed $expectedResult, mixed ...$args): void { $this->runTestCase('IFERROR', $expectedResult, ...$args); @@ -19,14 +20,14 @@ class IfErrorTest extends AllSetupTeardown return require 'tests/data/Calculation/Logical/IFERROR.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIfErrorArray')] + #[DataProvider('providerIfErrorArray')] public function testIfErrorArray(array $expectedResult, string $argument1, string $argument2): void { $calculation = Calculation::getInstance(); $formula = "=IFERROR({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIfErrorArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfNaTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfNaTest.php index f0fb8fdaa..17cb1fca4 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfNaTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfNaTest.php @@ -5,10 +5,11 @@ declare(strict_types=1); namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Logical; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; +use PHPUnit\Framework\Attributes\DataProvider; class IfNaTest extends AllSetupTeardown { - #[\PHPUnit\Framework\Attributes\DataProvider('providerIFNA')] + #[DataProvider('providerIFNA')] public function testIFNA(mixed $expectedResult, mixed ...$args): void { $this->runTestCase('IFNA', $expectedResult, ...$args); @@ -19,14 +20,14 @@ class IfNaTest extends AllSetupTeardown return require 'tests/data/Calculation/Logical/IFNA.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIfNaArray')] + #[DataProvider('providerIfNaArray')] public function testIfNaArray(array $expectedResult, string $argument1, string $argument2): void { $calculation = Calculation::getInstance(); $formula = "=IFNA({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIfNaArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfsTest.php index ff52852d8..0bdef31fc 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfsTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfsTest.php @@ -5,10 +5,11 @@ declare(strict_types=1); namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Logical; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; +use PHPUnit\Framework\Attributes\DataProvider; class IfsTest extends AllSetupTeardown { - #[\PHPUnit\Framework\Attributes\DataProvider('providerIFS')] + #[DataProvider('providerIFS')] public function testIFS(mixed $expectedResult, mixed ...$args): void { $this->runTestCase('IFS', $expectedResult, ...$args); @@ -19,14 +20,14 @@ class IfsTest extends AllSetupTeardown return require 'tests/data/Calculation/Logical/IFS.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIfsArray')] + #[DataProvider('providerIfsArray')] public function testIfsArray(array $expectedResult, string $bool1, string $argument1, string $bool2, string $argument2): void { $calculation = Calculation::getInstance(); $formula = "=IFS($bool1, {" . "$argument1}, $bool2, {" . "$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIfsArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/NotTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/NotTest.php index a4a071643..a4e9d0349 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/NotTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/NotTest.php @@ -5,10 +5,11 @@ declare(strict_types=1); namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Logical; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; +use PHPUnit\Framework\Attributes\DataProvider; class NotTest extends AllSetupTeardown { - #[\PHPUnit\Framework\Attributes\DataProvider('providerNOT')] + #[DataProvider('providerNOT')] public function testNOT(mixed $expectedResult, mixed ...$args): void { $this->runTestCase('NOT', $expectedResult, ...$args); @@ -19,14 +20,14 @@ class NotTest extends AllSetupTeardown return require 'tests/data/Calculation/Logical/NOT.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerNotArray')] + #[DataProvider('providerNotArray')] public function testNotArray(array $expectedResult, string $argument1): void { $calculation = Calculation::getInstance(); $formula = "=NOT({$argument1})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerNotArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/SwitchTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/SwitchTest.php index b1311f38c..f78e41888 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/SwitchTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/SwitchTest.php @@ -5,10 +5,11 @@ declare(strict_types=1); namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Logical; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; +use PHPUnit\Framework\Attributes\DataProvider; class SwitchTest extends AllSetupTeardown { - #[\PHPUnit\Framework\Attributes\DataProvider('providerSwitch')] + #[DataProvider('providerSwitch')] public function testSWITCH(mixed $expectedResult, mixed ...$args): void { $this->runTestCase('SWITCH', $expectedResult, ...$args); @@ -19,14 +20,14 @@ class SwitchTest extends AllSetupTeardown return require 'tests/data/Calculation/Logical/SWITCH.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerSwitchArray')] + #[DataProvider('providerSwitchArray')] public function testIfsArray(array $expectedResult, int $expression, int $value1, string $result1, int $value2, string $result2, string $default): void { $calculation = Calculation::getInstance(); $formula = "=SWITCH($expression, $value1, {" . "$result1}, $value2, {" . "$result2}, {" . "$default})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerSwitchArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressTest.php index 0fa5b2f8d..3795de3e1 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressTest.php @@ -6,11 +6,12 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\LookupRef; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\LookupRef; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class AddressTest extends TestCase { - #[\PHPUnit\Framework\Attributes\DataProvider('providerADDRESS')] + #[DataProvider('providerADDRESS')] public function testADDRESS(mixed $expectedResult, mixed ...$args): void { $result = LookupRef\Address::cell(...$args); @@ -22,14 +23,14 @@ class AddressTest extends TestCase return require 'tests/data/Calculation/LookupRef/ADDRESS.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerAddressArray')] + #[DataProvider('providerAddressArray')] public function testAddressArray(array $expectedResult, string $argument1, string $argument2): void { $calculation = Calculation::getInstance(); $formula = "=ADDRESS({$argument1}, {$argument2}, 4)"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerAddressArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ChooseTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ChooseTest.php index 6301156ff..857495079 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ChooseTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ChooseTest.php @@ -31,8 +31,8 @@ class ChooseTest extends TestCase $selections = implode(',', $selections); $formula = "=CHOOSE({$values}, {$selections})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerChooseArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsTest.php index 4e56896cb..8fac586c6 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsTest.php @@ -30,8 +30,8 @@ class ColumnsTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=COLUMNS({$argument})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerColumnsArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HLookupTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HLookupTest.php index 98d325c4f..6fd07cf66 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HLookupTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HLookupTest.php @@ -109,8 +109,8 @@ class HLookupTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=HLOOKUP({$values}, {$database}, {$index}, false)"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerHLookupArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexTest.php index 930bfd8a9..6b08848e4 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexTest.php @@ -7,11 +7,12 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\LookupRef; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Matrix; use PhpOffice\PhpSpreadsheet\Spreadsheet; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IndexTest extends TestCase { - #[\PHPUnit\Framework\Attributes\DataProvider('providerINDEX')] + #[DataProvider('providerINDEX')] public function testINDEX(mixed $expectedResult, mixed $matrix, mixed $rowNum = null, mixed $colNum = null): void { if ($rowNum === null) { @@ -29,14 +30,14 @@ class IndexTest extends TestCase return require 'tests/data/Calculation/LookupRef/INDEX.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerIndexArray')] + #[DataProvider('providerIndexArray')] public function testIndexArray(array $expectedResult, string $matrix, string $rows, string $columns): void { $calculation = Calculation::getInstance(); $formula = "=INDEX({$matrix}, {$rows}, {$columns})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerIndexArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/LookupTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/LookupTest.php index 6e6c67437..8c7d29244 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/LookupTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/LookupTest.php @@ -7,11 +7,12 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\LookupRef; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\LookupRef; use PhpOffice\PhpSpreadsheet\Spreadsheet; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class LookupTest extends TestCase { - #[\PHPUnit\Framework\Attributes\DataProvider('providerLOOKUP')] + #[DataProvider('providerLOOKUP')] public function testLOOKUP(mixed $expectedResult, mixed ...$args): void { $result = LookupRef\Lookup::lookup(...$args); @@ -23,14 +24,14 @@ class LookupTest extends TestCase return require 'tests/data/Calculation/LookupRef/LOOKUP.php'; } - #[\PHPUnit\Framework\Attributes\DataProvider('providerLookupArray')] + #[DataProvider('providerLookupArray')] public function testLookupArray(array $expectedResult, string $values, string $lookup, string $return): void { $calculation = Calculation::getInstance(); $formula = "=LOOKUP({$values}, {$lookup}, {$return})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerLookupArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatchTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatchTest.php index f6b03db1c..6cc30990e 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatchTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatchTest.php @@ -67,7 +67,7 @@ class MatchTest extends AllSetupTeardown $sheet->getCell('D1')->setValue($formula); $result = $sheet->getCell('D1')->getCalculatedValue(); - self::assertEquals($expectedResult, $result); + self::assertSame($expectedResult, $result); } public static function providerMATCH(): array @@ -81,8 +81,8 @@ class MatchTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=MATCH({$values}, {$selections}, 0)"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerMatchArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsTest.php index fc4f61d7d..a78e4dc16 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsTest.php @@ -30,8 +30,8 @@ class RowsTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=ROWS({$argument})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerRowsArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/VLookupTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/VLookupTest.php index 612bdb3d1..ef9dde738 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/VLookupTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/VLookupTest.php @@ -52,8 +52,8 @@ class VLookupTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=VLOOKUP({$values}, {$database}, {$index}, false)"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEquals($expectedResult, $result); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerVLookupArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AbsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AbsTest.php index e3561996f..42ecec72a 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AbsTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AbsTest.php @@ -34,7 +34,7 @@ class AbsTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ABS({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcosTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcosTest.php index c4214f587..dc6fd88e8 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcosTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcosTest.php @@ -30,7 +30,7 @@ class AcosTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ACOS({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcoshTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcoshTest.php index 9a31fa8d1..5e800e5cf 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcoshTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcoshTest.php @@ -30,7 +30,7 @@ class AcoshTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ACOSH({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcotTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcotTest.php index 3b85fff8f..0d04f7ce4 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcotTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcotTest.php @@ -33,7 +33,7 @@ class AcotTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ACOT({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcothTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcothTest.php index 1475d77d2..99e3190d4 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcothTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcothTest.php @@ -33,7 +33,7 @@ class AcothTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ACOTH({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ArabicTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ArabicTest.php index 60e108272..9a634dc1b 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ArabicTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ArabicTest.php @@ -30,7 +30,7 @@ class ArabicTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ARABIC({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinTest.php index cbf991494..404e139d3 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinTest.php @@ -30,7 +30,7 @@ class AsinTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ASIN({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinhTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinhTest.php index 2795b36a8..fe3df9184 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinhTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinhTest.php @@ -30,7 +30,7 @@ class AsinhTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ASINH({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Atan2Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Atan2Test.php index bbfa4da2d..8b04672a7 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Atan2Test.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Atan2Test.php @@ -31,7 +31,7 @@ class Atan2Test extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ATAN2({$argument1},{$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanTest.php index 7c217f81b..ce0455b04 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanTest.php @@ -30,7 +30,7 @@ class AtanTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ATAN({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanhTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanhTest.php index 3a121aa94..929c66e24 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanhTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanhTest.php @@ -30,7 +30,7 @@ class AtanhTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ATANH({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/BaseTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/BaseTest.php index a1c5e4e0b..755d4a572 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/BaseTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/BaseTest.php @@ -46,7 +46,7 @@ class BaseTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=BASE({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingMathTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingMathTest.php index 78d947e17..5f1276faf 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingMathTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingMathTest.php @@ -33,7 +33,7 @@ class CeilingMathTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CEILING.MATH({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingPreciseTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingPreciseTest.php index 922500c81..d41c1c0e1 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingPreciseTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingPreciseTest.php @@ -33,7 +33,7 @@ class CeilingPreciseTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CEILING.PRECISE({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingTest.php index 9b16ba786..60d9cde89 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingTest.php @@ -79,7 +79,7 @@ class CeilingTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CEILING({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinATest.php index 0dced2da8..9f148b2ea 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinATest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinATest.php @@ -35,7 +35,7 @@ class CombinATest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=COMBINA({$argument1},{$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinTest.php index ffe44293a..3fab027eb 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinTest.php @@ -35,7 +35,7 @@ class CombinTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=COMBIN({$argument1},{$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CosTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CosTest.php index 538e2a964..c9c4e9617 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CosTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CosTest.php @@ -30,7 +30,7 @@ class CosTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=COS({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CoshTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CoshTest.php index 40611d754..22f8e440a 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CoshTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CoshTest.php @@ -30,7 +30,7 @@ class CoshTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=COSH({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CotTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CotTest.php index c62a76bef..3c95eed7b 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CotTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CotTest.php @@ -33,7 +33,7 @@ class CotTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=COT({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CothTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CothTest.php index 445d97b44..ba7b1050c 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CothTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CothTest.php @@ -33,7 +33,7 @@ class CothTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=COTH({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CscTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CscTest.php index 9e835b503..a2e76008e 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CscTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CscTest.php @@ -33,7 +33,7 @@ class CscTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CSC({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CschTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CschTest.php index 77237729e..672bde770 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CschTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CschTest.php @@ -33,7 +33,7 @@ class CschTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CSCH({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/DegreesTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/DegreesTest.php index b6f546266..edbc27f83 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/DegreesTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/DegreesTest.php @@ -34,7 +34,7 @@ class DegreesTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=DEGREES({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/EvenTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/EvenTest.php index 653e4d083..3c0896039 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/EvenTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/EvenTest.php @@ -29,7 +29,7 @@ class EvenTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=EVEN({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ExpTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ExpTest.php index 188acd934..5b231fee5 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ExpTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ExpTest.php @@ -36,7 +36,7 @@ class ExpTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=EXP({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactDoubleTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactDoubleTest.php index 15f8159a2..d1ba0d275 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactDoubleTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactDoubleTest.php @@ -30,7 +30,7 @@ class FactDoubleTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=FACTDOUBLE({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactTest.php index 3ff4da971..ef37da211 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactTest.php @@ -61,7 +61,7 @@ class FactTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=FACT({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, self::FACT_PRECISION); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorMathTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorMathTest.php index 5f528cc86..34c0470fa 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorMathTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorMathTest.php @@ -33,7 +33,7 @@ class FloorMathTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=FLOOR.MATH({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorPreciseTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorPreciseTest.php index 74d3ce406..e4f433342 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorPreciseTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorPreciseTest.php @@ -33,7 +33,7 @@ class FloorPreciseTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=FLOOR.PRECISE({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorTest.php index 75c749f18..8ca3d63c2 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorTest.php @@ -79,7 +79,7 @@ class FloorTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=FLOOR({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/IntTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/IntTest.php index 0e81fcafb..a0b736b26 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/IntTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/IntTest.php @@ -33,7 +33,7 @@ class IntTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=INT({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LnTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LnTest.php index 774e2bc83..3da0a18b3 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LnTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LnTest.php @@ -36,7 +36,7 @@ class LnTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=LN({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Log10Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Log10Test.php index 52635d426..b7385c77c 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Log10Test.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Log10Test.php @@ -36,7 +36,7 @@ class Log10Test extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=LOG10({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LogTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LogTest.php index 62afdd287..5d2b1efe8 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LogTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LogTest.php @@ -41,7 +41,7 @@ class LogTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=LOG({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MRoundTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MRoundTest.php index 32020c71f..117444dd0 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MRoundTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MRoundTest.php @@ -33,7 +33,7 @@ class MRoundTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=MROUND({$argument1},{$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ModTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ModTest.php index bbedd1f3d..98671f181 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ModTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ModTest.php @@ -41,7 +41,7 @@ class ModTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=MOD({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/OddTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/OddTest.php index a61259643..35b456055 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/OddTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/OddTest.php @@ -29,7 +29,7 @@ class OddTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ODD({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PowerTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PowerTest.php index abf9f7ef3..f77fa422c 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PowerTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PowerTest.php @@ -41,7 +41,7 @@ class PowerTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=POWER({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/QuotientTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/QuotientTest.php index eb5827d5b..7f0d4440e 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/QuotientTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/QuotientTest.php @@ -41,7 +41,7 @@ class QuotientTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=QUOTIENT({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RadiansTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RadiansTest.php index 63dfb7fd0..892821c41 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RadiansTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RadiansTest.php @@ -34,7 +34,7 @@ class RadiansTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=RADIANS({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RandBetweenTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RandBetweenTest.php index 9b64991b5..f2fcfbe96 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RandBetweenTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RandBetweenTest.php @@ -52,7 +52,7 @@ class RandBetweenTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=RandBetween({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertIsArray($result); self::assertCount($expectedRows, $result); self::assertIsArray($result[0]); diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RomanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RomanTest.php index 57096ac27..2b339e405 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RomanTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RomanTest.php @@ -30,7 +30,7 @@ class RomanTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ROMAN({$values}, {$styles})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundDownTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundDownTest.php index 7c440df13..05026f485 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundDownTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundDownTest.php @@ -33,7 +33,7 @@ class RoundDownTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ROUNDDOWN({$argument1},{$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundTest.php index c10c982d1..ad0f0eabc 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundTest.php @@ -33,7 +33,7 @@ class RoundTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ROUND({$argument1},{$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundUpTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundUpTest.php index d7629357b..3d946bf97 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundUpTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundUpTest.php @@ -33,7 +33,7 @@ class RoundUpTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ROUNDUP({$argument1},{$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SecTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SecTest.php index e05c99b8e..343242003 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SecTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SecTest.php @@ -33,7 +33,7 @@ class SecTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=SEC({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SechTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SechTest.php index d2e4df742..134864b47 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SechTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SechTest.php @@ -33,7 +33,7 @@ class SechTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=SECH({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SeriesSumTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SeriesSumTest.php index 5f3469f18..53dfeec98 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SeriesSumTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SeriesSumTest.php @@ -46,7 +46,7 @@ class SeriesSumTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=SERIESSUM({$x}, {$n}, {$m}, {$values})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SignTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SignTest.php index 2a77d6eb3..b15f9ef1a 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SignTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SignTest.php @@ -32,7 +32,7 @@ class SignTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=SIGN({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinTest.php index ea7881361..ab0ec74e8 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinTest.php @@ -30,7 +30,7 @@ class SinTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=SIN({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinhTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinhTest.php index 50b7b32c4..0c5d5ff96 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinhTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinhTest.php @@ -30,7 +30,7 @@ class SinhTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=SINH({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtPiTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtPiTest.php index 1aecc8b6e..bd3287035 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtPiTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtPiTest.php @@ -36,7 +36,7 @@ class SqrtPiTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=SQRTPI({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtTest.php index 4e4fea06c..4a7868c52 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtTest.php @@ -34,7 +34,7 @@ class SqrtTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=SQRT({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanTest.php index b58562c1c..513012205 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanTest.php @@ -30,7 +30,7 @@ class TanTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=TAN({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanhTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanhTest.php index 31f704b22..1a77e2c57 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanhTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanhTest.php @@ -30,7 +30,7 @@ class TanhTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=TANH({$array})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TruncTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TruncTest.php index 31a160794..3e6fe655e 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TruncTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TruncTest.php @@ -33,7 +33,7 @@ class TruncTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=TRUNC({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaDistTest.php index a50693c00..223004e37 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaDistTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaDistTest.php @@ -25,7 +25,7 @@ class BetaDistTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=BETADIST({$argument1}, {$argument2}, {$argument3})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaInvTest.php index 7550510d1..d3a8a972c 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaInvTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaInvTest.php @@ -25,7 +25,7 @@ class BetaInvTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=BETAINV({$argument1}, {$argument2}, {$argument3})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistRangeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistRangeTest.php index 6ac55ec89..de174e6e3 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistRangeTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistRangeTest.php @@ -29,7 +29,7 @@ class BinomDistRangeTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=BINOM.DIST.RANGE({$trials}, {$probabilities}, {$successes})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistTest.php index 94b1b71a5..e9d2cdade 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistTest.php @@ -29,7 +29,7 @@ class BinomDistTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=BINOMDIST({$values}, {$trials}, {$probabilities}, false)"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomInvTest.php index 9cddd7462..876f40549 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomInvTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomInvTest.php @@ -29,7 +29,7 @@ class BinomInvTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=BINOM.INV({$trials}, {$probabilities}, {$alphas})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistLeftTailTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistLeftTailTest.php index e0581e7f7..0b74a4668 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistLeftTailTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistLeftTailTest.php @@ -26,7 +26,7 @@ class ChiDistLeftTailTest extends AllSetupTeardown $formula = "=CHISQ.DIST({$values}, {$degrees}, false)"; /** @var float|int|string */ - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistRightTailTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistRightTailTest.php index b2a3e18f6..9414d9b92 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistRightTailTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistRightTailTest.php @@ -25,7 +25,7 @@ class ChiDistRightTailTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CHISQ.DIST.RT({$values}, {$degrees})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvLeftTailTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvLeftTailTest.php index 475cf8887..99645c161 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvLeftTailTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvLeftTailTest.php @@ -27,10 +27,10 @@ class ChiInvLeftTailTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CHISQ.INV($probability, $degrees)"; /** @var float|int|string */ - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8); $formula = "=CHISQ.DIST($result, $degrees)"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($probability, $result, 1.0e-8); } @@ -40,7 +40,7 @@ class ChiInvLeftTailTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CHISQ.INV({$probabilities}, {$degrees})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvRightTailTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvRightTailTest.php index a09d14be4..629bd951e 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvRightTailTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvRightTailTest.php @@ -27,10 +27,10 @@ class ChiInvRightTailTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CHISQ.INV.RT($probability, $degrees)"; /** @var float|int|string */ - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8); $formula = "=CHISQ.DIST.RT($result, $degrees)"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($probability, $result, 1.0e-8); } @@ -40,7 +40,7 @@ class ChiInvRightTailTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CHISQ.INV.RT({$probabilities}, {$degrees})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ConfidenceTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ConfidenceTest.php index 2ea9ac53d..9cc79b7ef 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ConfidenceTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ConfidenceTest.php @@ -25,7 +25,7 @@ class ConfidenceTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CONFIDENCE({$alpha}, {$stdDev}, {$size})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ExponDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ExponDistTest.php index 516783c6b..13fa60c75 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ExponDistTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ExponDistTest.php @@ -25,7 +25,7 @@ class ExponDistTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=EXPONDIST({$values}, {$lambdas}, false)"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FDistTest.php index 20aad121a..ef40c4843 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FDistTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FDistTest.php @@ -25,7 +25,7 @@ class FDistTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=F.DIST({$values}, {$u}, {$v}, false)"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherInvTest.php index 2a5eaaadd..76951e91b 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherInvTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherInvTest.php @@ -25,7 +25,7 @@ class FisherInvTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=FISHERINV({$values})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherTest.php index d0f369ebd..2e37da556 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherTest.php @@ -25,7 +25,7 @@ class FisherTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=FISHER({$values})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ForecastTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ForecastTest.php index 8dee25710..d5f7266a5 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ForecastTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ForecastTest.php @@ -30,7 +30,7 @@ class ForecastTest extends TestCase $calculation = Calculation::getInstance(); $formula = "=FORECAST({$testValues}, {$yValues}, {$xValues})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaDistTest.php index 0a6379821..90b2b8670 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaDistTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaDistTest.php @@ -25,7 +25,7 @@ class GammaDistTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=GAMMA.DIST({$values}, {$alpha}, {$beta}, false)"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaInvTest.php index 1b48f4998..20f0a7cfe 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaInvTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaInvTest.php @@ -25,7 +25,7 @@ class GammaInvTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=GAMMA.INV({$values}, {$alpha}, {$beta})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaLnTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaLnTest.php index d7e47b49a..50a1640ea 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaLnTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaLnTest.php @@ -25,7 +25,7 @@ class GammaLnTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=GAMMALN({$values})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaTest.php index ba246a55a..a83db1fbe 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaTest.php @@ -25,7 +25,7 @@ class GammaTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=GAMMA({$values})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GaussTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GaussTest.php index 528d47bb3..e10120303 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GaussTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GaussTest.php @@ -25,7 +25,7 @@ class GaussTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=GAUSS({$values})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HypGeomDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HypGeomDistTest.php index 92db287c2..fcfe07fa9 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HypGeomDistTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HypGeomDistTest.php @@ -30,7 +30,7 @@ class HypGeomDistTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=HYPGEOMDIST({$sampleSuccesses}, {$sampleNumber}, {$populationSuccesses}, {$populationNumber})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogInvTest.php index 25c5bc665..b5a7b3f82 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogInvTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogInvTest.php @@ -25,7 +25,7 @@ class LogInvTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=LOGINV({$probabilities}, {$mean}, {$stdDev})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDist2Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDist2Test.php index fd8f3fb4f..6220b2fc5 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDist2Test.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDist2Test.php @@ -25,7 +25,7 @@ class LogNormDist2Test extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=LOGNORM.DIST({$values}, {$mean}, {$stdDev}, true)"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDistTest.php index 4820944a0..46a056fc4 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDistTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDistTest.php @@ -25,7 +25,7 @@ class LogNormDistTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=LOGNORMDIST({$values}, {$mean}, {$stdDev})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NegBinomDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NegBinomDistTest.php index 3a83fed89..814e06fa4 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NegBinomDistTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NegBinomDistTest.php @@ -29,7 +29,7 @@ class NegBinomDistTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=NEGBINOMDIST({$failures}, {$successes}, {$probabilities})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormDistTest.php index f9c444bf8..edf0ed920 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormDistTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormDistTest.php @@ -25,7 +25,7 @@ class NormDistTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=NORMDIST({$values}, {$mean}, {$stdDev}, false)"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormInvTest.php index 14a479c6f..a19f03c2f 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormInvTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormInvTest.php @@ -25,7 +25,7 @@ class NormInvTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=NORMINV({$probabilities}, {$mean}, {$stdDev})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDist2Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDist2Test.php index ea07827d6..ad3032501 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDist2Test.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDist2Test.php @@ -25,7 +25,7 @@ class NormSDist2Test extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=NORM.S.DIST({$values}, true)"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDistTest.php index 53b3aafe8..8971eaa80 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDistTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDistTest.php @@ -25,7 +25,7 @@ class NormSDistTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=NORMSDIST({$values})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSInvTest.php index f76312331..0a83211e8 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSInvTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSInvTest.php @@ -25,7 +25,7 @@ class NormSInvTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=NORMSINV({$probabilities})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutTest.php index 94223ce82..6bbd33352 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutTest.php @@ -25,7 +25,7 @@ class PermutTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=PERMUT({$argument1},{$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutationATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutationATest.php index 57cf1169a..a6be14b43 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutationATest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutationATest.php @@ -25,7 +25,7 @@ class PermutationATest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=PERMUTATIONA({$argument1},{$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PoissonTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PoissonTest.php index 23bcbfa67..9c39418d2 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PoissonTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PoissonTest.php @@ -25,7 +25,7 @@ class PoissonTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=POISSON({$values}, {$mean}, false)"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StandardizeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StandardizeTest.php index 02846869d..2833d3e04 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StandardizeTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StandardizeTest.php @@ -25,7 +25,7 @@ class StandardizeTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=STANDARDIZE({$argument1}, {$argument2}, {$argument3})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDistTest.php index 19811cf23..e119090d2 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDistTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDistTest.php @@ -25,7 +25,7 @@ class TDistTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=TDIST({$values}, {$degrees}, {$tails})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TinvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TinvTest.php index bdbabebfb..a5c64123e 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TinvTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TinvTest.php @@ -25,7 +25,7 @@ class TinvTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=TINV({$values}, {$degrees})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/WeibullTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/WeibullTest.php index 66d9e9275..257087a4b 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/WeibullTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/WeibullTest.php @@ -25,7 +25,7 @@ class WeibullTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=WEIBULL({$values}, {$alpha}, {$beta}, false)"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ZTestTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ZTestTest.php index b76f36b7f..04389f792 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ZTestTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ZTestTest.php @@ -25,7 +25,7 @@ class ZTestTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=ZTEST({$dataSet}, {$m0})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharTest.php index 2695af5aa..7c9b80626 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharTest.php @@ -36,8 +36,8 @@ class CharTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CHAR({$array})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerCharArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CleanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CleanTest.php index 6c45269b9..764079286 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CleanTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CleanTest.php @@ -36,8 +36,8 @@ class CleanTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CLEAN({$array})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerCleanArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CodeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CodeTest.php index 756e1fc64..99f467f93 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CodeTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CodeTest.php @@ -36,8 +36,8 @@ class CodeTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=CODE({$array})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerCodeArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/DollarTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/DollarTest.php index 27afb3a30..1937cb0d6 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/DollarTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/DollarTest.php @@ -40,8 +40,8 @@ class DollarTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=DOLLAR({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerDollarArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ExactTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ExactTest.php index 94f804542..97ba2536a 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ExactTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ExactTest.php @@ -40,8 +40,8 @@ class ExactTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=EXACT({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerExactArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FindTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FindTest.php index e928bea4d..e63b7b953 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FindTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FindTest.php @@ -45,8 +45,8 @@ class FindTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=FIND({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerFindArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FixedTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FixedTest.php index 039ae8e26..670157034 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FixedTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FixedTest.php @@ -45,8 +45,8 @@ class FixedTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=FIXED({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerFixedArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LeftTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LeftTest.php index 2e4d38cc7..6cc32d9e6 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LeftTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LeftTest.php @@ -177,8 +177,8 @@ class LeftTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=LEFT({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerLeftArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LenTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LenTest.php index 356145187..0fbead66a 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LenTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LenTest.php @@ -36,8 +36,8 @@ class LenTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=LEN({$array})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerLenArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LowerTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LowerTest.php index b19a6f6bb..6597021fa 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LowerTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LowerTest.php @@ -65,8 +65,8 @@ class LowerTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=LOWER({$array})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerLowerArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/MidTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/MidTest.php index 9bc670bae..e50875a28 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/MidTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/MidTest.php @@ -199,8 +199,8 @@ class MidTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=MID({$argument1}, {$argument2}, {$argument3})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerMidArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/NumberValueTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/NumberValueTest.php index 088ad7b0d..c944d4ea6 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/NumberValueTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/NumberValueTest.php @@ -47,7 +47,7 @@ class NumberValueTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=NumberValue({$argument1}, {$argument2}, {$argument3})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, self::NV_PRECISION); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ProperTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ProperTest.php index 43838ca2a..e235cd937 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ProperTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ProperTest.php @@ -65,8 +65,8 @@ class ProperTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=PROPER({$array})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerProperArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReplaceTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReplaceTest.php index a064ea814..478317950 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReplaceTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReplaceTest.php @@ -56,8 +56,8 @@ class ReplaceTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=REPLACE({$oldText}, {$start}, {$chars}, {$newText})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerReplaceArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReptTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReptTest.php index 1977b90bb..54a443dcf 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReptTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReptTest.php @@ -40,8 +40,8 @@ class ReptTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=REPT({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerReptArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/RightTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/RightTest.php index 7e127b9cc..5da233e57 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/RightTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/RightTest.php @@ -177,8 +177,8 @@ class RightTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=RIGHT({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerRightArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SearchTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SearchTest.php index cdb36fc81..dd5b4bf67 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SearchTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SearchTest.php @@ -45,8 +45,8 @@ class SearchTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=SEARCH({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerSearchArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SubstituteTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SubstituteTest.php index 216aae1cc..ba3fde9e0 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SubstituteTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SubstituteTest.php @@ -51,8 +51,8 @@ class SubstituteTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=SUBSTITUTE({$oldText}, {$fromText}, {$toText})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerSubstituteArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TTest.php index 5e09eceda..6584cf5ce 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TTest.php @@ -36,7 +36,7 @@ class TTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=T({$argument})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertSame($expectedResult, $result); } diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextJoinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextJoinTest.php index 9b1d65b36..9c1036c00 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextJoinTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextJoinTest.php @@ -42,8 +42,8 @@ class TextJoinTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=TEXTJOIN({$delimiter}, {$blanks}, {$texts})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerTextjoinArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextTest.php index 19e2b1721..3dabd9519 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextTest.php @@ -40,8 +40,8 @@ class TextTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=TEXT({$argument1}, {$argument2})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerTextArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TrimTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TrimTest.php index 89f12155d..9fce12e59 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TrimTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TrimTest.php @@ -36,8 +36,8 @@ class TrimTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=TRIM({$array})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerTrimArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UpperTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UpperTest.php index e0e8937e0..2810231d0 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UpperTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UpperTest.php @@ -65,8 +65,8 @@ class UpperTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=UPPER({$array})"; - $result = $calculation->_calculateFormulaValue($formula); - self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); + $result = $calculation->calculateFormula($formula); + self::assertSame($expectedResult, $result); } public static function providerUpperArray(): array diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueTest.php index a18bdf8e4..25b6caab9 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueTest.php @@ -49,7 +49,7 @@ class ValueTest extends AllSetupTeardown $calculation = Calculation::getInstance(); $formula = "=VALUE({$argument})"; - $result = $calculation->_calculateFormulaValue($formula); + $result = $calculation->calculateFormula($formula); self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14); }