From d647fe7ee7d4264a875b7393d0c836cf277110d3 Mon Sep 17 00:00:00 2001
From: oleibman <10341515+oleibman@users.noreply.github.com>
Date: Sat, 23 Nov 2024 20:56:26 -0800
Subject: [PATCH] Use Php Attributes Rather than Annotations for PhpUnit
With PhpUnit 10 came the ability to use Php attributes rather than doc-block annotations for things like "data provider". PhpUnit 11 deprecates the use of annotations, and PhpUnit 12 will not not permit their use. Since PhpUnit 11 requires Php8.2+, we cannot adopt it as long as we support Php8.1, which will continue to be the case for some time. However, there is no penalty for early adoption.
Php-cs-fixer can use:
```
'php_unit_attributes' => ['keep_annotations' => false],
```
This allows us to run `composer fix` to automate all the needed changes. No manual changes were needed for any of the test members.
With this change, PhpUnit 9 can no longer be used with the test suite. File composer.json is updated to reflect that reality, and phpunit9.xml.dist, which has been supplied in case anyone needed to use PhpUnit 9, is no longer required, and is thus deleted. For now, PhpUnit 11 is not being added as a possibility.
No source code is changed in this PR.
---
.php-cs-fixer.dist.php | 1 +
CONTRIBUTING.md | 2 +-
composer.json | 2 +-
phpunit.xml.dist | 1 +
phpunit9.xml.dist | 15 ----
.../Calculation/ArrayFormulaTest.php | 4 +-
.../Calculation/BinaryComparisonTest.php | 4 +-
.../CalculationFunctionListTest.php | 4 +-
.../Calculation/CalculationSettingsTest.php | 4 +-
.../Calculation/CalculationTest.php | 7 +-
.../DefinedNamesCalculationTest.php | 16 ++---
.../Engine/FormattedNumberSlashTest.php | 12 +---
.../Engine/FormattedNumberTest.php | 16 ++---
.../Calculation/Engine/RangeTest.php | 15 ++--
.../Engine/StructuredReferenceSlashTest.php | 8 +--
.../Engine/StructuredReferenceTest.php | 8 +--
.../Calculation/FormulaAsStringTest.php | 4 +-
.../Calculation/FormulaParserTest.php | 4 +-
.../Functions/Database/DAverageTest.php | 8 +--
.../Functions/Database/DCountATest.php | 8 +--
.../Functions/Database/DCountTest.php | 8 +--
.../Functions/Database/DGetTest.php | 8 +--
.../Functions/Database/DMaxTest.php | 8 +--
.../Functions/Database/DMinTest.php | 8 +--
.../Functions/Database/DProductTest.php | 8 +--
.../Functions/Database/DStDevPTest.php | 8 +--
.../Functions/Database/DStDevTest.php | 8 +--
.../Functions/Database/DSumTest.php | 8 +--
.../Functions/Database/DVarPTest.php | 8 +--
.../Functions/Database/DVarTest.php | 8 +--
.../Functions/DateTime/DateDifTest.php | 20 ++----
.../Functions/DateTime/DateTest.php | 24 ++-----
.../Functions/DateTime/DateValueTest.php | 20 ++----
.../Functions/DateTime/DayTest.php | 28 ++------
.../Functions/DateTime/Days360Test.php | 20 ++----
.../Functions/DateTime/DaysTest.php | 20 ++----
.../Functions/DateTime/EDateTest.php | 20 ++----
.../Functions/DateTime/EoMonthTest.php | 20 ++----
.../Functions/DateTime/HourTest.php | 20 ++----
.../Functions/DateTime/IsoWeekNumTest.php | 24 ++-----
.../Functions/DateTime/MinuteTest.php | 20 ++----
.../Functions/DateTime/MonthTest.php | 20 ++----
.../Functions/DateTime/NetworkDaysTest.php | 20 ++----
.../Functions/DateTime/SecondTest.php | 20 ++----
.../Functions/DateTime/TimeTest.php | 20 ++----
.../Functions/DateTime/TimeValueTest.php | 20 ++----
.../Functions/DateTime/WeekDayTest.php | 20 ++----
.../Functions/DateTime/WeekNumTest.php | 24 ++-----
.../Functions/DateTime/WorkDayTest.php | 20 ++----
.../Functions/DateTime/YearFracTest.php | 20 ++----
.../Functions/DateTime/YearTest.php | 20 ++----
.../Functions/Engineering/BesselITest.php | 20 ++----
.../Functions/Engineering/BesselJTest.php | 20 ++----
.../Functions/Engineering/BesselKTest.php | 20 ++----
.../Functions/Engineering/BesselYTest.php | 20 ++----
.../Functions/Engineering/Bin2DecTest.php | 24 ++-----
.../Functions/Engineering/Bin2HexTest.php | 24 ++-----
.../Functions/Engineering/Bin2OctTest.php | 24 ++-----
.../Functions/Engineering/BitAndTest.php | 20 ++----
.../Functions/Engineering/BitLShiftTest.php | 20 ++----
.../Functions/Engineering/BitOrTest.php | 20 ++----
.../Functions/Engineering/BitRShiftTest.php | 20 ++----
.../Functions/Engineering/BitXorTest.php | 20 ++----
.../Functions/Engineering/ComplexTest.php | 16 ++---
.../Functions/Engineering/ConvertUoMTest.php | 20 ++----
.../Functions/Engineering/Dec2BinTest.php | 24 ++-----
.../Functions/Engineering/Dec2HexTest.php | 24 ++-----
.../Functions/Engineering/Dec2OctTest.php | 24 ++-----
.../Functions/Engineering/DeltaTest.php | 20 ++----
.../Functions/Engineering/ErfCTest.php | 20 ++----
.../Functions/Engineering/ErfPreciseTest.php | 16 ++---
.../Functions/Engineering/ErfTest.php | 20 ++----
.../Functions/Engineering/GeStepTest.php | 20 ++----
.../Functions/Engineering/Hex2BinTest.php | 24 ++-----
.../Functions/Engineering/Hex2DecTest.php | 24 ++-----
.../Functions/Engineering/Hex2OctTest.php | 24 ++-----
.../Functions/Engineering/ImAbsTest.php | 20 ++----
.../Functions/Engineering/ImArgumentTest.php | 16 ++---
.../Functions/Engineering/ImConjugateTest.php | 20 ++----
.../Functions/Engineering/ImCosTest.php | 20 ++----
.../Functions/Engineering/ImCoshTest.php | 20 ++----
.../Functions/Engineering/ImCotTest.php | 20 ++----
.../Functions/Engineering/ImCscTest.php | 20 ++----
.../Functions/Engineering/ImCschTest.php | 20 ++----
.../Functions/Engineering/ImDivTest.php | 20 ++----
.../Functions/Engineering/ImExpTest.php | 20 ++----
.../Functions/Engineering/ImLnTest.php | 20 ++----
.../Functions/Engineering/ImLog10Test.php | 20 ++----
.../Functions/Engineering/ImLog2Test.php | 20 ++----
.../Functions/Engineering/ImPowerTest.php | 20 ++----
.../Functions/Engineering/ImProductTest.php | 15 ++--
.../Functions/Engineering/ImRealTest.php | 20 ++----
.../Functions/Engineering/ImSecTest.php | 20 ++----
.../Functions/Engineering/ImSechTest.php | 20 ++----
.../Functions/Engineering/ImSinTest.php | 20 ++----
.../Functions/Engineering/ImSinhTest.php | 20 ++----
.../Functions/Engineering/ImSqrtTest.php | 20 ++----
.../Functions/Engineering/ImSubTest.php | 20 ++----
.../Functions/Engineering/ImSumTest.php | 15 ++--
.../Functions/Engineering/ImTanTest.php | 20 ++----
.../Functions/Engineering/ImaginaryTest.php | 20 ++----
.../Functions/Engineering/Oct2BinTest.php | 24 ++-----
.../Functions/Engineering/Oct2DecTest.php | 24 ++-----
.../Functions/Engineering/Oct2HexTest.php | 24 ++-----
.../Functions/Financial/AccrintMTest.php | 4 +-
.../Functions/Financial/AccrintTest.php | 4 +-
.../Functions/Financial/AmorDegRcTest.php | 4 +-
.../Functions/Financial/AmorLincTest.php | 4 +-
.../Functions/Financial/CoupDayBsTest.php | 4 +-
.../Functions/Financial/CoupDaysNcTest.php | 4 +-
.../Functions/Financial/CoupDaysTest.php | 4 +-
.../Functions/Financial/CoupNcdTest.php | 4 +-
.../Functions/Financial/CoupNumTest.php | 4 +-
.../Functions/Financial/CoupPcdTest.php | 4 +-
.../Functions/Financial/CumIpmtTest.php | 4 +-
.../Functions/Financial/CumPrincTest.php | 4 +-
.../Functions/Financial/DbTest.php | 4 +-
.../Functions/Financial/DdbTest.php | 4 +-
.../Functions/Financial/DiscTest.php | 4 +-
.../Functions/Financial/DollarDeTest.php | 8 +--
.../Functions/Financial/DollarFrTest.php | 4 +-
.../Functions/Financial/EffectTest.php | 4 +-
.../Functions/Financial/FvScheduleTest.php | 4 +-
.../Functions/Financial/FvTest.php | 4 +-
.../Functions/Financial/HelpersTest.php | 4 +-
.../Functions/Financial/IPmtTest.php | 4 +-
.../Functions/Financial/IntRateTest.php | 4 +-
.../Functions/Financial/IrrTest.php | 4 +-
.../Functions/Financial/IsPmtTest.php | 4 +-
.../Functions/Financial/MirrTest.php | 4 +-
.../Functions/Financial/NPerTest.php | 4 +-
.../Functions/Financial/NominalTest.php | 4 +-
.../Functions/Financial/NpvTest.php | 4 +-
.../Functions/Financial/PDurationTest.php | 4 +-
.../Functions/Financial/PmtTest.php | 4 +-
.../Functions/Financial/PpmtTest.php | 4 +-
.../Functions/Financial/PriceDiscTest.php | 4 +-
.../Functions/Financial/PriceMatTest.php | 4 +-
.../Functions/Financial/PriceTest.php | 8 +--
.../Functions/Financial/PvTest.php | 4 +-
.../Functions/Financial/RateTest.php | 4 +-
.../Functions/Financial/ReceivedTest.php | 4 +-
.../Functions/Financial/RriTest.php | 4 +-
.../Functions/Financial/SlnTest.php | 4 +-
.../Functions/Financial/SydTest.php | 4 +-
.../Functions/Financial/TBillEqTest.php | 4 +-
.../Functions/Financial/TBillPriceTest.php | 4 +-
.../Functions/Financial/TBillYieldTest.php | 4 +-
.../Functions/Financial/UsDollarTest.php | 4 +-
.../Functions/Financial/XNpvTest.php | 4 +-
.../Functions/Financial/XirrTest.php | 4 +-
.../Functions/Financial/YieldDiscTest.php | 4 +-
.../Functions/Financial/YieldMatTest.php | 4 +-
.../Functions/Information/ErrorTypeTest.php | 8 +--
.../Functions/Information/IsBlankTest.php | 8 +--
.../Functions/Information/IsErrTest.php | 8 +--
.../Functions/Information/IsErrorTest.php | 8 +--
.../Functions/Information/IsEvenTest.php | 8 +--
.../Functions/Information/IsLogicalTest.php | 8 +--
.../Functions/Information/IsNaTest.php | 8 +--
.../Functions/Information/IsNonTextTest.php | 8 +--
.../Functions/Information/IsNumberTest.php | 8 +--
.../Functions/Information/IsOddTest.php | 8 +--
.../Functions/Information/IsTextTest.php | 8 +--
.../Functions/Information/NTest.php | 4 +-
.../Functions/Information/TypeTest.php | 4 +-
.../Calculation/Functions/Logical/AndTest.php | 8 +--
.../Functions/Logical/IfErrorTest.php | 8 +--
.../Functions/Logical/IfNaTest.php | 8 +--
.../Calculation/Functions/Logical/IfTest.php | 4 +-
.../Calculation/Functions/Logical/IfsTest.php | 8 +--
.../Calculation/Functions/Logical/NotTest.php | 8 +--
.../Calculation/Functions/Logical/OrTest.php | 8 +--
.../Functions/Logical/SwitchTest.php | 8 +--
.../Calculation/Functions/Logical/XorTest.php | 8 +--
.../LookupRef/AddressInternationalTest.php | 8 +--
.../Functions/LookupRef/AddressTest.php | 8 +--
.../Functions/LookupRef/ChooseTest.php | 8 +--
.../LookupRef/ColumnOnSpreadsheetTest.php | 4 +-
.../Functions/LookupRef/ColumnTest.php | 4 +-
.../LookupRef/ColumnsOnSpreadsheetTest.php | 4 +-
.../Functions/LookupRef/ColumnsTest.php | 8 +--
.../Functions/LookupRef/FormulaTextTest.php | 4 +-
.../Functions/LookupRef/HLookupTest.php | 12 +---
.../Functions/LookupRef/HyperlinkTest.php | 8 +--
.../LookupRef/IndexOnSpreadsheetTest.php | 8 +--
.../Functions/LookupRef/IndexTest.php | 8 +--
.../LookupRef/IndirectInternationalTest.php | 12 +---
.../Functions/LookupRef/IndirectTest.php | 8 +--
.../Functions/LookupRef/LookupTest.php | 8 +--
.../Functions/LookupRef/MatchTest.php | 12 +---
.../LookupRef/MatrixHelperFunctionsTest.php | 8 +--
.../Functions/LookupRef/OffsetTest.php | 4 +-
.../LookupRef/RowOnSpreadsheetTest.php | 4 +-
.../Functions/LookupRef/RowTest.php | 4 +-
.../LookupRef/RowsOnSpreadsheetTest.php | 4 +-
.../Functions/LookupRef/RowsTest.php | 8 +--
.../Functions/LookupRef/SortByTest.php | 8 +--
.../Functions/LookupRef/SortTest.php | 16 ++---
.../Functions/LookupRef/TransposeTest.php | 4 +-
.../Functions/LookupRef/UniqueTest.php | 4 +-
.../Functions/LookupRef/VLookupTest.php | 8 +--
.../Functions/MathTrig/AbsTest.php | 8 +--
.../Functions/MathTrig/AcosTest.php | 8 +--
.../Functions/MathTrig/AcoshTest.php | 8 +--
.../Functions/MathTrig/AcotTest.php | 8 +--
.../Functions/MathTrig/AcothTest.php | 8 +--
.../Functions/MathTrig/ArabicTest.php | 8 +--
.../Functions/MathTrig/AsinTest.php | 8 +--
.../Functions/MathTrig/AsinhTest.php | 8 +--
.../Functions/MathTrig/Atan2Test.php | 8 +--
.../Functions/MathTrig/AtanTest.php | 8 +--
.../Functions/MathTrig/AtanhTest.php | 8 +--
.../Functions/MathTrig/BaseTest.php | 8 +--
.../Functions/MathTrig/CeilingMathTest.php | 8 +--
.../Functions/MathTrig/CeilingPreciseTest.php | 8 +--
.../Functions/MathTrig/CeilingTest.php | 8 +--
.../Functions/MathTrig/CombinATest.php | 8 +--
.../Functions/MathTrig/CombinTest.php | 8 +--
.../Functions/MathTrig/CosTest.php | 8 +--
.../Functions/MathTrig/CoshTest.php | 8 +--
.../Functions/MathTrig/CotTest.php | 8 +--
.../Functions/MathTrig/CothTest.php | 8 +--
.../Functions/MathTrig/CscTest.php | 8 +--
.../Functions/MathTrig/CschTest.php | 8 +--
.../Functions/MathTrig/DegreesTest.php | 8 +--
.../Functions/MathTrig/EvenTest.php | 8 +--
.../Functions/MathTrig/ExpTest.php | 8 +--
.../Functions/MathTrig/FactDoubleTest.php | 8 +--
.../Functions/MathTrig/FactTest.php | 12 +---
.../Functions/MathTrig/FloorMathTest.php | 8 +--
.../Functions/MathTrig/FloorPreciseTest.php | 8 +--
.../Functions/MathTrig/FloorTest.php | 8 +--
.../Functions/MathTrig/GcdTest.php | 4 +-
.../Functions/MathTrig/IntTest.php | 8 +--
.../Functions/MathTrig/LcmTest.php | 4 +-
.../Calculation/Functions/MathTrig/LnTest.php | 8 +--
.../Functions/MathTrig/Log10Test.php | 8 +--
.../Functions/MathTrig/LogTest.php | 8 +--
.../Functions/MathTrig/MInverseTest.php | 4 +-
.../Functions/MathTrig/MMultTest.php | 4 +-
.../Functions/MathTrig/MRoundTest.php | 8 +--
.../Functions/MathTrig/MdeTermTest.php | 4 +-
.../Functions/MathTrig/ModTest.php | 8 +--
.../Functions/MathTrig/MultinomialTest.php | 4 +-
.../Functions/MathTrig/OddTest.php | 8 +--
.../Calculation/Functions/MathTrig/PiTest.php | 4 +-
.../Functions/MathTrig/PowerTest.php | 8 +--
.../Functions/MathTrig/ProductTest.php | 4 +-
.../Functions/MathTrig/QuotientTest.php | 8 +--
.../Functions/MathTrig/RadiansTest.php | 8 +--
.../Functions/MathTrig/RandBetweenTest.php | 8 +--
.../Functions/MathTrig/RomanTest.php | 8 +--
.../Functions/MathTrig/RoundDownTest.php | 8 +--
.../Functions/MathTrig/RoundTest.php | 8 +--
.../Functions/MathTrig/RoundUpTest.php | 8 +--
.../Functions/MathTrig/SecTest.php | 8 +--
.../Functions/MathTrig/SechTest.php | 8 +--
.../Functions/MathTrig/SequenceTest.php | 3 +-
.../Functions/MathTrig/SeriesSumTest.php | 8 +--
.../Functions/MathTrig/SignTest.php | 8 +--
.../Functions/MathTrig/SinTest.php | 8 +--
.../Functions/MathTrig/SinhTest.php | 8 +--
.../Functions/MathTrig/SqrtPiTest.php | 8 +--
.../Functions/MathTrig/SqrtTest.php | 8 +--
.../Functions/MathTrig/SubTotalTest.php | 12 +---
.../Functions/MathTrig/SumIfTest.php | 4 +-
.../Functions/MathTrig/SumIfsTest.php | 4 +-
.../Functions/MathTrig/SumProductTest.php | 4 +-
.../Functions/MathTrig/SumSqTest.php | 4 +-
.../Functions/MathTrig/SumTest.php | 12 +---
.../Functions/MathTrig/SumX2MY2Test.php | 4 +-
.../Functions/MathTrig/SumX2PY2Test.php | 4 +-
.../Functions/MathTrig/SumXMY2Test.php | 4 +-
.../Functions/MathTrig/TanTest.php | 8 +--
.../Functions/MathTrig/TanhTest.php | 8 +--
.../Functions/MathTrig/TruncTest.php | 12 +---
.../Functions/Statistical/AveDevTest.php | 4 +-
.../Functions/Statistical/AverageATest.php | 4 +-
.../Functions/Statistical/AverageIfTest.php | 4 +-
.../Functions/Statistical/AverageIfsTest.php | 4 +-
.../Functions/Statistical/AverageTest.php | 4 +-
.../Functions/Statistical/BetaDistTest.php | 8 +--
.../Functions/Statistical/BetaInvTest.php | 8 +--
.../Statistical/BinomDistRangeTest.php | 8 +--
.../Functions/Statistical/BinomDistTest.php | 8 +--
.../Functions/Statistical/BinomInvTest.php | 8 +--
.../Statistical/ChiDistLeftTailTest.php | 8 +--
.../Statistical/ChiDistRightTailTest.php | 8 +--
.../Statistical/ChiInvLeftTailTest.php | 8 +--
.../Statistical/ChiInvRightTailTest.php | 8 +--
.../Functions/Statistical/ChiTestTest.php | 4 +-
.../Functions/Statistical/ConfidenceTest.php | 8 +--
.../Functions/Statistical/CorrelTest.php | 4 +-
.../Functions/Statistical/CountATest.php | 4 +-
.../Functions/Statistical/CountBlankTest.php | 4 +-
.../Functions/Statistical/CountIfTest.php | 4 +-
.../Functions/Statistical/CountIfsTest.php | 4 +-
.../Functions/Statistical/CountTest.php | 16 ++---
.../Functions/Statistical/CovarTest.php | 4 +-
.../Functions/Statistical/DevSqTest.php | 4 +-
.../Functions/Statistical/ExponDistTest.php | 8 +--
.../Functions/Statistical/FDistTest.php | 8 +--
.../Functions/Statistical/FisherInvTest.php | 8 +--
.../Functions/Statistical/FisherTest.php | 8 +--
.../Functions/Statistical/ForecastTest.php | 8 +--
.../Functions/Statistical/GammaDistTest.php | 8 +--
.../Functions/Statistical/GammaInvTest.php | 8 +--
.../Functions/Statistical/GammaLnTest.php | 8 +--
.../Functions/Statistical/GammaTest.php | 8 +--
.../Functions/Statistical/GaussTest.php | 8 +--
.../Functions/Statistical/GeoMeanTest.php | 4 +-
.../Functions/Statistical/GrowthTest.php | 4 +-
.../Functions/Statistical/HarMeanTest.php | 4 +-
.../Functions/Statistical/HypGeomDistTest.php | 8 +--
.../Functions/Statistical/InterceptTest.php | 4 +-
.../Functions/Statistical/KurtTest.php | 4 +-
.../Functions/Statistical/LargeTest.php | 4 +-
.../Functions/Statistical/LinEstTest.php | 4 +-
.../Functions/Statistical/LogEstTest.php | 4 +-
.../Functions/Statistical/LogInvTest.php | 8 +--
.../Statistical/LogNormDist2Test.php | 8 +--
.../Functions/Statistical/LogNormDistTest.php | 8 +--
.../Functions/Statistical/MaxATest.php | 4 +-
.../Functions/Statistical/MaxIfsTest.php | 4 +-
.../Functions/Statistical/MaxTest.php | 4 +-
.../Functions/Statistical/MedianTest.php | 4 +-
.../Functions/Statistical/MinATest.php | 4 +-
.../Functions/Statistical/MinIfsTest.php | 4 +-
.../Functions/Statistical/MinTest.php | 4 +-
.../Functions/Statistical/ModeTest.php | 4 +-
.../Statistical/NegBinomDistTest.php | 8 +--
.../Functions/Statistical/NormDistTest.php | 8 +--
.../Functions/Statistical/NormInvTest.php | 8 +--
.../Functions/Statistical/NormSDist2Test.php | 8 +--
.../Functions/Statistical/NormSDistTest.php | 8 +--
.../Functions/Statistical/NormSInvTest.php | 8 +--
.../Functions/Statistical/PercentRankTest.php | 3 +-
.../Functions/Statistical/PercentileTest.php | 4 +-
.../Functions/Statistical/PermutTest.php | 8 +--
.../Statistical/PermutationATest.php | 8 +--
.../Functions/Statistical/PoissonTest.php | 8 +--
.../Functions/Statistical/QuartileTest.php | 4 +-
.../Functions/Statistical/RankTest.php | 3 +-
.../Functions/Statistical/RsqTest.php | 4 +-
.../Functions/Statistical/SkewTest.php | 4 +-
.../Functions/Statistical/SlopeTest.php | 4 +-
.../Functions/Statistical/SmallTest.php | 4 +-
.../Functions/Statistical/StDevATest.php | 8 +--
.../Functions/Statistical/StDevPATest.php | 8 +--
.../Functions/Statistical/StDevPTest.php | 8 +--
.../Functions/Statistical/StDevTest.php | 8 +--
.../Functions/Statistical/StandardizeTest.php | 8 +--
.../Functions/Statistical/SteyxTest.php | 4 +-
.../Functions/Statistical/TDistTest.php | 8 +--
.../Functions/Statistical/TinvTest.php | 8 +--
.../Functions/Statistical/TrendTest.php | 4 +-
.../Functions/Statistical/TrimMeanTest.php | 4 +-
.../Functions/Statistical/VarATest.php | 8 +--
.../Functions/Statistical/VarPATest.php | 8 +--
.../Functions/Statistical/VarPTest.php | 8 +--
.../Functions/Statistical/VarTest.php | 8 +--
.../Functions/Statistical/WeibullTest.php | 8 +--
.../Functions/Statistical/ZTestTest.php | 8 +--
.../Functions/TextData/ArrayToTextTest.php | 4 +-
.../TextData/CharNonPrintableTest.php | 4 +-
.../Functions/TextData/CharTest.php | 8 +--
.../Functions/TextData/CleanTest.php | 8 +--
.../Functions/TextData/CodeTest.php | 8 +--
.../Functions/TextData/ConcatTest.php | 4 +-
.../TextData/ConcatenateGnumericTest.php | 3 +-
.../Functions/TextData/ConcatenateTest.php | 4 +-
.../Functions/TextData/DollarTest.php | 8 +--
.../Functions/TextData/ExactTest.php | 8 +--
.../Functions/TextData/FindTest.php | 8 +--
.../Functions/TextData/FixedTest.php | 8 +--
.../Functions/TextData/LeftTest.php | 23 ++-----
.../Functions/TextData/LenTest.php | 8 +--
.../Functions/TextData/LowerTest.php | 12 +---
.../Functions/TextData/MidTest.php | 23 ++-----
.../Functions/TextData/NumberValueTest.php | 8 +--
.../Functions/TextData/OpenOfficeTest.php | 4 +-
.../Functions/TextData/ProperTest.php | 12 +---
.../Functions/TextData/ReplaceTest.php | 8 +--
.../Functions/TextData/ReptTest.php | 8 +--
.../Functions/TextData/RightTest.php | 23 ++-----
.../Functions/TextData/SearchTest.php | 8 +--
.../Functions/TextData/SubstituteTest.php | 8 +--
.../Calculation/Functions/TextData/TTest.php | 8 +--
.../Functions/TextData/TextAfterTest.php | 4 +-
.../Functions/TextData/TextBeforeTest.php | 4 +-
.../Functions/TextData/TextJoinTest.php | 8 +--
.../Functions/TextData/TextSplitTest.php | 4 +-
.../Functions/TextData/TextTest.php | 8 +--
.../Functions/TextData/TrimTest.php | 8 +--
.../Functions/TextData/UpperTest.php | 12 +---
.../Functions/TextData/ValueTest.php | 8 +--
.../Functions/TextData/ValueToTextTest.php | 4 +-
.../Functions/Web/UrlEncodeTest.php | 4 +-
.../Functions/Web/WebServiceTest.php | 4 +-
.../Calculation/FunctionsTest.php | 4 +-
.../Calculation/InternalFunctionsTest.php | 8 +--
.../Calculation/MergedCellTest.php | 8 +--
.../Calculation/MissingArgumentsTest.php | 4 +-
.../Calculation/ParseFormulaTest.php | 4 +-
.../Calculation/RefErrorTest.php | 4 +-
.../Calculation/RowColumnReferenceTest.php | 4 +-
.../StructuredReferenceFormulaTest.php | 4 +-
.../Calculation/TranslationTest.php | 4 +-
.../Cell/AddressHelperTest.php | 36 +++-------
.../Cell/AdvancedValueBinderTest.php | 24 ++-----
.../Cell/CellAddressTest.php | 28 ++------
.../Cell/CellDetachTest.php | 8 +--
tests/PhpSpreadsheetTests/Cell/CellTest.php | 12 +---
.../Cell/CoordinateTest.php | 68 +++++--------------
.../Cell/DefaultValueBinderTest.php | 8 +--
.../Cell/StringValueBinderTest.php | 24 ++-----
.../CellReferenceHelperTest.php | 32 +++------
.../Chart/Charts32CatAxValAxTest.php | 4 +-
.../Chart/Charts32XmlTest.php | 8 +--
.../Chart/Issue562Test.php | 4 +-
.../DefinedNameFormulaTest.php | 4 +-
.../Document/EpochTest.php | 8 +--
.../Document/PropertiesTest.php | 12 +---
.../Document/SecurityTest.php | 4 +-
.../DocumentGeneratorTest.php | 8 +--
.../Functional/ActiveSheetTest.php | 3 +-
.../Functional/ColumnWidthTest.php | 4 +-
.../Functional/CommentsTest.php | 3 +-
.../Functional/ConditionalStopIfTrueTest.php | 4 +-
.../Functional/EnclosureTest.php | 4 +-
.../Functional/FreezePaneTest.php | 16 ++---
.../Functional/MergedCellsTest.php | 4 +-
.../Functional/PrintAreaTest.php | 4 +-
.../Functional/ReadBlankCellsTest.php | 6 +-
.../Functional/ReadFilterTest.php | 6 +-
.../Functional/SelectedCellsTest.php | 3 +-
.../Functional/StreamTest.php | 7 +-
.../TypeAttributePreservationTest.php | 6 +-
.../Functional/WorkbookViewAttributesTest.php | 3 +-
.../Helper/DimensionTest.php | 8 +--
tests/PhpSpreadsheetTests/Helper/HtmlTest.php | 4 +-
.../Helper/SampleCoverageTest.php | 4 +-
.../PhpSpreadsheetTests/Helper/SampleTest.php | 10 +--
tests/PhpSpreadsheetTests/IOFactoryTest.php | 12 +---
tests/PhpSpreadsheetTests/NamedRange2Test.php | 4 +-
.../Reader/Csv/CsvEncodingTest.php | 16 ++---
.../Reader/Csv/CsvIssue2232Test.php | 8 +--
.../Reader/Csv/CsvLineEndingTest.php | 8 +--
.../Reader/Csv/CsvNumberFormatLocaleTest.php | 14 ++--
.../Reader/Csv/CsvNumberFormatTest.php | 12 +---
.../Reader/Csv/CsvTest.php | 12 +---
.../Reader/Gnumeric/ArrayFormula2Test.php | 4 +-
.../Reader/Gnumeric/ArrayFormulaTest.php | 4 +-
.../Reader/Gnumeric/GnumericStylesTest.php | 24 ++-----
.../Reader/Gnumeric/PageSetupTest.php | 8 +--
.../Reader/Html/HtmlBorderTest.php | 4 +-
.../Reader/Html/HtmlCharsetTest.php | 4 +-
.../Reader/Html/HtmlLibxmlTest.php | 3 +-
.../Reader/Html/HtmlPhpunit10Test.php | 3 +-
.../Reader/Html/HtmlTest.php | 4 +-
.../Reader/Ods/ArrayFormulaTest.php | 4 +-
.../Reader/Security/XmlScannerTest.php | 20 ++----
.../Reader/Xls/ColorMapTest.php | 4 +-
.../Xls/ConditionalFormattingBasicTest.php | 4 +-
.../ConditionalFormattingExpressionTest.php | 4 +-
.../Reader/Xls/DataValidationTest.php | 4 +-
.../Reader/Xls/ErrorCodeMapTest.php | 4 +-
.../Reader/Xlsx/AutoFilterTest.php | 4 +-
.../Reader/Xlsx/DataValidationTest.php | 3 +-
.../Reader/Xlsx/DirectorySeparatorTest.php | 16 ++---
.../Reader/Xlsx/GridlinesTest.php | 4 +-
.../Reader/Xlsx/XlsxTest.php | 3 +-
.../Reader/Xml/XmlStyleCoverageTest.php | 8 +--
.../Reader/Xml/XmlTest.php | 4 +-
tests/PhpSpreadsheetTests/RefRangeTest.php | 4 +-
.../ReferenceHelper4Test.php | 4 +-
.../ReferenceHelperTest.php | 8 +--
.../Shared/CodePageTest.php | 3 +-
.../PhpSpreadsheetTests/Shared/Date2Test.php | 16 ++---
tests/PhpSpreadsheetTests/Shared/DateTest.php | 31 +++------
.../Shared/DrawingTest.php | 8 +--
.../Shared/ExactFontTest.php | 2 +-
.../PhpSpreadsheetTests/Shared/Font2Test.php | 4 +-
.../Shared/FontFileNameTest.php | 20 ++----
tests/PhpSpreadsheetTests/Shared/FontTest.php | 16 ++---
.../Shared/OLEPhpunit10Test.php | 3 +-
.../Shared/PasswordHasherTest.php | 4 +-
.../Shared/PasswordReloadTest.php | 4 +-
.../Shared/Trend/ExponentialBestFitTest.php | 3 +-
.../Shared/Trend/LinearBestFitTest.php | 3 +-
tests/PhpSpreadsheetTests/SpreadsheetTest.php | 4 +-
.../Style/ColorIndexTest.php | 4 +-
tests/PhpSpreadsheetTests/Style/ColorTest.php | 16 ++---
.../ConditionalFormatting/CellMatcherTest.php | 40 +++--------
.../Wizard/CellValueWizardTest.php | 24 ++-----
.../Wizard/DateValueWizardTest.php | 4 +-
.../Wizard/ExpressionWizardTest.php | 8 +--
.../Wizard/WizardFactoryTest.php | 7 +-
.../NumberFormat/Wizard/AccountingTest.php | 12 +---
.../NumberFormat/Wizard/CurrencyTest.php | 12 +---
.../Style/NumberFormat/Wizard/DateTest.php | 3 +-
.../NumberFormat/Wizard/DateTimeTest.php | 3 +-
.../NumberFormat/Wizard/DurationTest.php | 3 +-
.../Style/NumberFormat/Wizard/NumberTest.php | 8 +--
.../NumberFormat/Wizard/PercentageTest.php | 8 +--
.../NumberFormat/Wizard/ScientificTest.php | 8 +--
.../Style/NumberFormat/Wizard/TimeTest.php | 3 +-
.../Style/NumberFormatTest.php | 13 ++--
.../AutoFilter/AutoFilterAverageTop10Test.php | 12 +---
.../AutoFilterCustomNumericTest.php | 4 +-
.../AutoFilter/AutoFilterCustomTextTest.php | 8 +--
.../AutoFilter/AutoFilterMonthTest.php | 4 +-
.../AutoFilter/AutoFilterQuarterTest.php | 4 +-
.../AutoFilter/AutoFilterTodayTest.php | 4 +-
.../AutoFilter/AutoFilterWeekTest.php | 4 +-
.../AutoFilter/AutoFilterYearTest.php | 4 +-
.../Worksheet/AutoFilter/RuleCustomTest.php | 4 +-
.../Worksheet/ColumnCellIterator2Test.php | 16 ++---
.../Worksheet/ColumnDimension2Test.php | 4 +-
.../Worksheet/ColumnIteratorEmptyTest.php | 16 ++---
.../Worksheet/ConditionalStyleTest.php | 8 +--
.../Worksheet/Issue4112Test.php | 3 +-
.../Worksheet/MergeBehaviourTest.php | 4 +-
.../Worksheet/PageMarginsTest.php | 24 ++-----
.../Worksheet/RowCellIterator2Test.php | 16 ++---
.../Worksheet/RowDimensionSaveTest.php | 4 +-
.../Worksheet/RowIteratorEmptyTest.php | 16 ++---
.../Worksheet/Table/TableTest.php | 12 +---
.../Worksheet/WorksheetTest.php | 40 +++--------
.../Writer/Dompdf/PaperSizeArrayTest.php | 3 +-
.../Writer/Html/HtmlCommentsTest.php | 4 +-
.../Writer/Html/HtmlNumberFormatTest.php | 8 +--
.../Writer/Html/LongTitleTest.php | 4 +-
.../Writer/Html/MemoryDrawingOffsetTest.php | 4 +-
.../Writer/Html/XssVulnerabilityTest.php | 4 +-
.../Writer/PreCalcTest.php | 4 +-
.../Writer/RetainSelectedCellsTest.php | 5 +-
.../Writer/Xls/VisibilityTest.php | 12 +---
.../Xlsx/ArrayFormulaValidationTest.php | 4 +-
.../Writer/Xlsx/ConditionalTest.php | 24 ++-----
.../Writer/Xlsx/DrawingsTest.php | 3 +-
.../Writer/Xlsx/FloatsRetainedTest.php | 4 +-
.../Writer/Xlsx/FunctionPrefixTest.php | 4 +-
.../Writer/Xlsx/Issue2266Test.php | 4 +-
.../Writer/Xlsx/Issue3951Test.php | 4 +-
.../Writer/Xlsx/LocaleFloatsTest.php | 6 +-
.../Writer/Xlsx/VisibilityTest.php | 12 +---
tests/bootstrap.php | 1 -
549 files changed, 1263 insertions(+), 3742 deletions(-)
delete mode 100644 phpunit9.xml.dist
diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php
index c4711f12a0..6348cc0051 100644
--- a/.php-cs-fixer.dist.php
+++ b/.php-cs-fixer.dist.php
@@ -146,6 +146,7 @@
'ordered_imports' => true,
'ordered_interfaces' => true,
'ordered_traits' => true,
+ 'php_unit_attributes' => ['keep_annotations' => false],
'php_unit_construct' => true,
'php_unit_dedicate_assert' => true,
'php_unit_dedicate_assert_internal_type' => true,
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 209a9199e4..709792031f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -40,7 +40,7 @@ This makes it easier to see exactly what is being tested when reviewing the PR.
2. Tag subject must be the version number, eg: `1.2.3`
3. Tag body must be a copy-paste of the changelog entries.
3. Push the tag with `git push --tags`, GitHub Actions will create a GitHub release automatically, and the release details will automatically be sent to packagist.
-4. By default, Github remove markdown headings in the Release Notes. You can either edit to restore these, or, probably preferably, change the default comment character on your system - `git config core.commentChar ';'`.
+4. By default, Github removes markdown headings in the Release Notes. You can either edit to restore these, or, probably preferably, change the default comment character on your system - `git config core.commentChar ";"`.
> **Note:** Tagged releases are made from the `master` branch. Only in an emergency should a tagged release be made from the `release` branch. (i.e. cherry-picked hot-fixes.) However, there are 3 branches which have been updated to apply security patches, and those may be tagged if future security updates are needed.
- release1291
diff --git a/composer.json b/composer.json
index 6acb8333c5..7f1777676c 100644
--- a/composer.json
+++ b/composer.json
@@ -95,7 +95,7 @@
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.1",
"phpstan/phpstan-phpunit": "^1.0",
- "phpunit/phpunit": "^9.6 || ^10.5",
+ "phpunit/phpunit": "^10.5",
"squizlabs/php_codesniffer": "^3.7",
"tecnickcom/tcpdf": "^6.5"
},
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 207d8ec978..d3e845c1ea 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -3,6 +3,7 @@
+
./tests/PhpSpreadsheetTests
diff --git a/phpunit9.xml.dist b/phpunit9.xml.dist
deleted file mode 100644
index 896b73339f..0000000000
--- a/phpunit9.xml.dist
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- ./src
-
-
-
-
-
-
-
- ./tests/PhpSpreadsheetTests
-
-
diff --git a/tests/PhpSpreadsheetTests/Calculation/ArrayFormulaTest.php b/tests/PhpSpreadsheetTests/Calculation/ArrayFormulaTest.php
index f1847fb645..976e8d54bc 100644
--- a/tests/PhpSpreadsheetTests/Calculation/ArrayFormulaTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/ArrayFormulaTest.php
@@ -10,9 +10,7 @@
class ArrayFormulaTest extends TestCase
{
- /**
- * @dataProvider providerArrayFormulae
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerArrayFormulae')]
public function testArrayFormula(string $formula, mixed $expectedResult): void
{
$result = Calculation::getInstance()->_calculateFormulaValue($formula);
diff --git a/tests/PhpSpreadsheetTests/Calculation/BinaryComparisonTest.php b/tests/PhpSpreadsheetTests/Calculation/BinaryComparisonTest.php
index 86b8697563..5ceabe0225 100644
--- a/tests/PhpSpreadsheetTests/Calculation/BinaryComparisonTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/BinaryComparisonTest.php
@@ -24,9 +24,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerBinaryComparison
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBinaryComparison')]
public function testBinaryComparisonOperation(
mixed $operand1,
mixed $operand2,
diff --git a/tests/PhpSpreadsheetTests/Calculation/CalculationFunctionListTest.php b/tests/PhpSpreadsheetTests/Calculation/CalculationFunctionListTest.php
index 978162667f..7a5e062efa 100644
--- a/tests/PhpSpreadsheetTests/Calculation/CalculationFunctionListTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/CalculationFunctionListTest.php
@@ -24,9 +24,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerGetFunctions
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGetFunctions')]
public function testGetFunctions(array|string $functionCall): void
{
self::assertIsCallable($functionCall);
diff --git a/tests/PhpSpreadsheetTests/Calculation/CalculationSettingsTest.php b/tests/PhpSpreadsheetTests/Calculation/CalculationSettingsTest.php
index afaf58d0ee..d57161fd53 100644
--- a/tests/PhpSpreadsheetTests/Calculation/CalculationSettingsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/CalculationSettingsTest.php
@@ -29,9 +29,7 @@ protected function tearDown(): void
$calculation->setLocale($this->locale);
}
- /**
- * @dataProvider providerCanLoadAllSupportedLocales
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCanLoadAllSupportedLocales')]
public function testCanLoadAllSupportedLocales(string $locale): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/CalculationTest.php b/tests/PhpSpreadsheetTests/Calculation/CalculationTest.php
index 4910eb0bad..3a4e67aef8 100644
--- a/tests/PhpSpreadsheetTests/Calculation/CalculationTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/CalculationTest.php
@@ -27,9 +27,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerBinaryComparisonOperation
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBinaryComparisonOperation')]
public function testBinaryComparisonOperation(string $formula, mixed $expectedResultExcel, mixed $expectedResultOpenOffice): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
@@ -374,9 +372,8 @@ public function testBranchPruningFormulaParsingInequalitiesConditionsCase(): voi
* be set in cache
* @param string[] $shouldNotBeSetInCacheCells coordinates of cells that must
* not be set in cache because of pruning
- *
- * @dataProvider dataProviderBranchPruningFullExecution
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderBranchPruningFullExecution')]
public function testFullExecutionDataPruning(
mixed $expectedResult,
array $dataArray,
diff --git a/tests/PhpSpreadsheetTests/Calculation/DefinedNamesCalculationTest.php b/tests/PhpSpreadsheetTests/Calculation/DefinedNamesCalculationTest.php
index d011f3c7f6..4485a591ee 100644
--- a/tests/PhpSpreadsheetTests/Calculation/DefinedNamesCalculationTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/DefinedNamesCalculationTest.php
@@ -9,9 +9,7 @@
class DefinedNamesCalculationTest extends TestCase
{
- /**
- * @dataProvider namedRangeCalculationTest1
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('namedRangeCalculationTest1')]
public function testNamedRangeCalculations1(string $cellAddress, float $expectedValue): void
{
$inputFileType = 'Xlsx';
@@ -24,9 +22,7 @@ public function testNamedRangeCalculations1(string $cellAddress, float $expected
self::assertSame($expectedValue, $calculatedCellValue, "Failed calculation for cell {$cellAddress}");
}
- /**
- * @dataProvider namedRangeCalculationTest2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('namedRangeCalculationTest2')]
public function testNamedRangeCalculationsWithAdjustedRateValue(string $cellAddress, float $expectedValue): void
{
$inputFileType = 'Xlsx';
@@ -41,9 +37,7 @@ public function testNamedRangeCalculationsWithAdjustedRateValue(string $cellAddr
self::assertSame($expectedValue, $calculatedCellValue, "Failed calculation for cell {$cellAddress}");
}
- /**
- * @dataProvider namedRangeCalculationTest1
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('namedRangeCalculationTest1')]
public function testNamedFormulaCalculations1(string $cellAddress, float $expectedValue): void
{
$inputFileType = 'Xlsx';
@@ -56,9 +50,7 @@ public function testNamedFormulaCalculations1(string $cellAddress, float $expect
self::assertSame($expectedValue, $calculatedCellValue, "Failed calculation for cell {$cellAddress}");
}
- /**
- * @dataProvider namedRangeCalculationTest2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('namedRangeCalculationTest2')]
public function testNamedFormulaeCalculationsWithAdjustedRateValue(string $cellAddress, float $expectedValue): void
{
$inputFileType = 'Xlsx';
diff --git a/tests/PhpSpreadsheetTests/Calculation/Engine/FormattedNumberSlashTest.php b/tests/PhpSpreadsheetTests/Calculation/Engine/FormattedNumberSlashTest.php
index c23f738709..d9dd251423 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Engine/FormattedNumberSlashTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Engine/FormattedNumberSlashTest.php
@@ -17,9 +17,7 @@ protected function tearDown(): void
StringHelper::setThousandsSeparator(null);
}
- /**
- * @dataProvider providerNumbers
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNumbers')]
public function testNumber(float $expected, string $value, string $thousandsSeparator = ',', string $decimalSeparator = '.'): void
{
StringHelper::setThousandsSeparator($thousandsSeparator);
@@ -38,9 +36,7 @@ public static function providerNumbers(): array
];
}
- /**
- * @dataProvider providerPercentages
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPercentages')]
public function testPercentage(string $expected, string $value, string $thousandsSeparator = ',', string $decimalSeparator = '.'): void
{
$originalValue = $value;
@@ -61,9 +57,7 @@ public static function providerPercentages(): array
];
}
- /**
- * @dataProvider providerCurrencies
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCurrencies')]
public function testCurrencies(string $expected, string $value, string $thousandsSeparator = ',', string $decimalSeparator = '.', ?string $currencyCode = null): void
{
$originalValue = $value;
diff --git a/tests/PhpSpreadsheetTests/Calculation/Engine/FormattedNumberTest.php b/tests/PhpSpreadsheetTests/Calculation/Engine/FormattedNumberTest.php
index fef4d66b5b..3410a04c63 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Engine/FormattedNumberTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Engine/FormattedNumberTest.php
@@ -10,9 +10,7 @@
class FormattedNumberTest extends TestCase
{
- /**
- * @dataProvider providerNumbers
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNumbers')]
public function testNumber(float $expected, string $value): void
{
FormattedNumber::convertToNumberIfFormatted($value);
@@ -31,9 +29,7 @@ public static function providerNumbers(): array
];
}
- /**
- * @dataProvider providerFractions
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFractions')]
public function testFraction(string $expected, string $value): void
{
$originalValue = $value;
@@ -60,9 +56,7 @@ public static function providerFractions(): array
];
}
- /**
- * @dataProvider providerPercentages
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPercentages')]
public function testPercentage(string $expected, string $value): void
{
$originalValue = $value;
@@ -189,9 +183,7 @@ public static function providerPercentages(): array
];
}
- /**
- * @dataProvider providerCurrencies
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCurrencies')]
public function testCurrencies(string $expected, string $value): void
{
$originalValue = $value;
diff --git a/tests/PhpSpreadsheetTests/Calculation/Engine/RangeTest.php b/tests/PhpSpreadsheetTests/Calculation/Engine/RangeTest.php
index aa7bc529d9..85ed7fdc42 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Engine/RangeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Engine/RangeTest.php
@@ -33,9 +33,7 @@ protected function tearDown(): void
}
}
- /**
- * @dataProvider providerRangeEvaluation
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRangeEvaluation')]
public function testRangeEvaluation(string $formula, int|string $expectedResult): void
{
$this->spreadSheet = $this->getSpreadsheet();
@@ -97,9 +95,7 @@ public function test3dRangeEvaluation(): void
$workSheet->getCell('E1')->getCalculatedValue();
}
- /**
- * @dataProvider providerNamedRangeEvaluation
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNamedRangeEvaluation')]
public function testNamedRangeEvaluation(array $ranges, string $formula, int $expectedResult): void
{
$this->spreadSheet = $this->getSpreadsheet();
@@ -134,11 +130,10 @@ public static function providerNamedRangeEvaluation(): array
}
/**
- * @dataProvider providerUTF8NamedRangeEvaluation
- *
* @param string[] $names
* @param string[] $ranges
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUTF8NamedRangeEvaluation')]
public function testUTF8NamedRangeEvaluation(array $names, array $ranges, string $formula, int $expectedResult): void
{
$this->spreadSheet = $this->getSpreadsheet();
@@ -162,9 +157,7 @@ public static function providerUTF8NamedRangeEvaluation(): array
];
}
- /**
- * @dataProvider providerCompositeNamedRangeEvaluation
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCompositeNamedRangeEvaluation')]
public function testCompositeNamedRangeEvaluation(string $composite, int $expectedSum, int $expectedCount): void
{
if ($this->incompleteMessage !== '') {
diff --git a/tests/PhpSpreadsheetTests/Calculation/Engine/StructuredReferenceSlashTest.php b/tests/PhpSpreadsheetTests/Calculation/Engine/StructuredReferenceSlashTest.php
index bd94002f9c..68e5f3ade3 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Engine/StructuredReferenceSlashTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Engine/StructuredReferenceSlashTest.php
@@ -54,9 +54,7 @@ protected function tearDown(): void
parent::tearDown();
}
- /**
- * @dataProvider structuredReferenceProviderColumnData
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('structuredReferenceProviderColumnData')]
public function testStructuredReferenceColumns(string $expectedCellRange, string $structuredReference): void
{
$spreadsheet = $this->getSpreadsheet();
@@ -65,9 +63,7 @@ public function testStructuredReferenceColumns(string $expectedCellRange, string
self::assertSame($expectedCellRange, $cellRange);
}
- /**
- * @dataProvider structuredReferenceProviderRowData
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('structuredReferenceProviderRowData')]
public function testStructuredReferenceRows(string $expectedCellRange, string $structuredReference): void
{
$spreadsheet = $this->getSpreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Engine/StructuredReferenceTest.php b/tests/PhpSpreadsheetTests/Calculation/Engine/StructuredReferenceTest.php
index 4597957013..40223813d6 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Engine/StructuredReferenceTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Engine/StructuredReferenceTest.php
@@ -70,9 +70,7 @@ public function testStructuredReferenceInvalidCellForTable(): void
$structuredReferenceObject->parse($cell);
}
- /**
- * @dataProvider structuredReferenceProviderColumnData
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('structuredReferenceProviderColumnData')]
public function testStructuredReferenceColumns(string $expectedCellRange, string $structuredReference): void
{
$cell = $this->spreadSheet->getActiveSheet()->getCell('E5');
@@ -82,9 +80,7 @@ public function testStructuredReferenceColumns(string $expectedCellRange, string
self::assertSame($expectedCellRange, $cellRange);
}
- /**
- * @dataProvider structuredReferenceProviderRowData
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('structuredReferenceProviderRowData')]
public function testStructuredReferenceRows(string $expectedCellRange, string $structuredReference): void
{
$cell = $this->spreadSheet->getActiveSheet()->getCell('E5');
diff --git a/tests/PhpSpreadsheetTests/Calculation/FormulaAsStringTest.php b/tests/PhpSpreadsheetTests/Calculation/FormulaAsStringTest.php
index aeb13e0b5b..ab6c40e67b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/FormulaAsStringTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/FormulaAsStringTest.php
@@ -9,9 +9,7 @@
class FormulaAsStringTest extends TestCase
{
- /**
- * @dataProvider providerFunctionsAsString
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFunctionsAsString')]
public function testFunctionsAsString(mixed $expectedResult, string $formula): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/FormulaParserTest.php b/tests/PhpSpreadsheetTests/Calculation/FormulaParserTest.php
index 10ce2cd488..a747710de8 100644
--- a/tests/PhpSpreadsheetTests/Calculation/FormulaParserTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/FormulaParserTest.php
@@ -31,9 +31,7 @@ public function testNoFormula(): void
self::assertSame(0, $result->getTokenCount());
}
- /**
- * @dataProvider providerFormulaParser
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormulaParser')]
public function testFormulaParser(string $formula, array $expectedResult): void
{
$formula = "=$formula";
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DAverageTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DAverageTest.php
index 18978afa04..75d381ea75 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DAverageTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DAverageTest.php
@@ -9,18 +9,14 @@
class DAverageTest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDAverage
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAverage')]
public function testDirectCallToDAverage(int|float|string $expectedResult, array $database, string|int|null $field, array $criteria): void
{
$result = DAverage::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDAverage
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAverage')]
public function testDAverageAsWorksheetFormula(int|float|string $expectedResult, array $database, string|int|null $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DAVERAGE', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DCountATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DCountATest.php
index 6ddcfd6cbb..2a9fd2f40f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DCountATest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DCountATest.php
@@ -9,18 +9,14 @@
class DCountATest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDCountA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDCountA')]
public function testDirectCallToDCountA(int|string $expectedResult, array $database, string $field, array $criteria): void
{
$result = DCountA::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDCountA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDCountA')]
public function testDCountAAsWorksheetFormula(int|string $expectedResult, array $database, string $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DCOUNTA', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DCountTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DCountTest.php
index ded350b937..4a3e18cefc 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DCountTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DCountTest.php
@@ -9,18 +9,14 @@
class DCountTest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDCount
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDCount')]
public function testDirectCallToDCount(int|string $expectedResult, array $database, string|int|null $field, array $criteria): void
{
$result = DCount::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDCount
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDCount')]
public function testDCountAsWorksheetFormula(int|string $expectedResult, array $database, string|int|null $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DCOUNT', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DGetTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DGetTest.php
index 0522616045..57b9e9bdb3 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DGetTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DGetTest.php
@@ -9,18 +9,14 @@
class DGetTest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDGet
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDGet')]
public function testDirectCallToDGet(string|int $expectedResult, array $database, ?string $field, array $criteria): void
{
$result = DGet::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDGet
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDGet')]
public function testDGetAsWorksheetFormula(string|int $expectedResult, array $database, ?string $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DGET', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DMaxTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DMaxTest.php
index 2689fa3cf3..ec8fa3ff87 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DMaxTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DMaxTest.php
@@ -9,18 +9,14 @@
class DMaxTest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDMax
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDMax')]
public function testDirectCallToDMax(int|string $expectedResult, array $database, string|null|int $field, array $criteria): void
{
$result = DMax::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDMax
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDMax')]
public function testDMaxAsWorksheetFormula(int|string $expectedResult, array $database, string|null|int $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DMAX', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DMinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DMinTest.php
index c1e553dc18..5fb3d121fb 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DMinTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DMinTest.php
@@ -9,18 +9,14 @@
class DMinTest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDMin
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDMin')]
public function testDirectCallToDMin(int|float|string $expectedResult, array $database, string|null|int $field, array $criteria): void
{
$result = DMin::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDMin
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDMin')]
public function testDMinAsWorksheetFormula(int|float|string $expectedResult, array $database, string|null|int $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DMIN', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DProductTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DProductTest.php
index 57590ee253..dd86903b5a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DProductTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DProductTest.php
@@ -10,18 +10,14 @@
class DProductTest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDProduct
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDProduct')]
public function testDirectCallToDProduct(float|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$result = DProduct::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDProduct
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDProduct')]
public function testDProductAsWorksheetFormula(float|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DPRODUCT', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DStDevPTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DStDevPTest.php
index bb80b211bb..349abcae55 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DStDevPTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DStDevPTest.php
@@ -9,18 +9,14 @@
class DStDevPTest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDStDevP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDStDevP')]
public function testDirectCallToDStDevP(float|int|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$result = DStDevP::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDStDevP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDStDevP')]
public function testDStDevPAsWorksheetFormula(float|int|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DSTDEVP', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DStDevTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DStDevTest.php
index 73eb7a4108..2edd578c48 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DStDevTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DStDevTest.php
@@ -9,18 +9,14 @@
class DStDevTest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDStDev
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDStDev')]
public function testDirectCallToDStDev(float|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$result = DStDev::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDStDev
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDStDev')]
public function testDStDevAsWorksheetFormula(float|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DSTDEV', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DSumTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DSumTest.php
index 3589e89595..6f97f49f94 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DSumTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DSumTest.php
@@ -9,18 +9,14 @@
class DSumTest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDSum
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDSum')]
public function testDirectCallToDSum(int|float|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$result = DSum::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDSum
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDSum')]
public function testDSumAsWorksheetFormula(int|float|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DSUM', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DVarPTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DVarPTest.php
index c880bb62e7..a3bbbf32ad 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DVarPTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DVarPTest.php
@@ -9,18 +9,14 @@
class DVarPTest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDVarP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDVarP')]
public function testDirectCallToDVarP(float|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$result = DVarP::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDVarP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDVarP')]
public function testDVarPAsWorksheetFormula(float|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DVARP', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DVarTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DVarTest.php
index 7a0e923f99..0a77db76e7 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DVarTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/DVarTest.php
@@ -9,18 +9,14 @@
class DVarTest extends SetupTeardownDatabases
{
- /**
- * @dataProvider providerDVar
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDVar')]
public function testDirectCallToDVar(float|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$result = DVar::evaluate($database, $field, $criteria);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerDVar
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDVar')]
public function testDVarAsWorksheetFormula(float|string $expectedResult, array $database, ?string $field, array $criteria): void
{
$this->prepareWorksheetWithFormula('DVAR', $database, $field, $criteria);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateDifTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateDifTest.php
index 79cc6f0a74..e6d81c8822 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateDifTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateDifTest.php
@@ -16,18 +16,14 @@
class DateDifTest extends TestCase
{
- /**
- * @dataProvider providerDATEDIF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDATEDIF')]
public function testDirectCallToDATEDIF(array|int|string $expectedResult, string ...$args): void
{
$result = Difference::interval(...$args);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerDATEDIF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDATEDIF')]
public function testDATEDIFAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -39,9 +35,7 @@ public function testDATEDIFAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerDATEDIF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDATEDIF')]
public function testDATEDIFInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -64,9 +58,7 @@ public static function providerDATEDIF(): array
return require 'tests/data/Calculation/DateTime/DATEDIF.php';
}
- /**
- * @dataProvider providerUnhappyDATEDIF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyDATEDIF')]
public function testDATEDIFUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -99,9 +91,7 @@ public function testDateObject(): void
self::assertSame(31, Days::between($obj1, $obj2));
}
- /**
- * @dataProvider providerDateDifArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateDifArray')]
public function testDateDifArray(array $expectedResult, string $startDate, string $endDate, ?string $methods): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateTest.php
index 57d535a031..043c35b7ba 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateTest.php
@@ -36,18 +36,14 @@ protected function tearDown(): void
Functions::setReturnDateType($this->returnDateType);
}
- /**
- * @dataProvider providerDATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDATE')]
public function testDirectCallToDATE(float|string $expectedResult, int|string $year, float|int|string $month, float|int|string $day): void
{
$result = Date::fromYMD($year, $month, $day);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerDATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDATE')]
public function testDATEAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -59,9 +55,7 @@ public function testDATEAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerDATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDATE')]
public function testDATEInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -84,9 +78,7 @@ public static function providerDATE(): array
return require 'tests/data/Calculation/DateTime/DATE.php';
}
- /**
- * @dataProvider providerUnhappyDATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyDATE')]
public function testDATEUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -144,9 +136,7 @@ public function testDATEWith1904Calendar(): void
self::assertEquals($result, ExcelError::NAN());
}
- /**
- * @dataProvider providerDateArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateArray')]
public function testDateArray(array $expectedResult, string $year, string $month, string $day): void
{
$calculation = Calculation::getInstance();
@@ -210,9 +200,7 @@ public static function providerDateArray(): array
];
}
- /**
- * @dataProvider providerDateArrayException
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateArrayException')]
public function testDateArrayException(string $year, string $month, string $day): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateValueTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateValueTest.php
index 27b652e423..4c2d0d4bce 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateValueTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DateValueTest.php
@@ -54,9 +54,7 @@ private function parseTemplatedExpectation(float|int|string $expectedResult): st
return (string) $x;
}
- /**
- * @dataProvider providerDATEVALUE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDATEVALUE')]
public function testDirectCallToDATEVALUE(int|string $expectedResult, bool|int|string $value): void
{
if ($this->expectationIsTemplate($expectedResult)) {
@@ -67,9 +65,7 @@ public function testDirectCallToDATEVALUE(int|string $expectedResult, bool|int|s
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);
}
- /**
- * @dataProvider providerDATEVALUE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDATEVALUE')]
public function testDATEVALUEAsFormula(float|int|string $expectedResult, mixed ...$args): void
{
if ($this->expectationIsTemplate($expectedResult)) {
@@ -85,9 +81,7 @@ public function testDATEVALUEAsFormula(float|int|string $expectedResult, mixed .
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);
}
- /**
- * @dataProvider providerDATEVALUE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDATEVALUE')]
public function testDATEVALUEInWorksheet(float|int|string $expectedResult, mixed ...$args): void
{
if ($this->expectationIsTemplate($expectedResult)) {
@@ -123,9 +117,7 @@ public function testRefArgNull(): void
$spreadsheet->disconnectWorksheets();
}
- /**
- * @dataProvider providerUnhappyDATEVALUE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyDATEVALUE')]
public function testDATEVALUEUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -183,9 +175,7 @@ public function testDATEVALUEWith1904Calendar(): void
self::assertEquals('#VALUE!', DateValue::fromString('1900-02-29'));
}
- /**
- * @dataProvider providerDateValueArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateValueArray')]
public function testDateValueArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DayTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DayTest.php
index c439d03759..e507deef69 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DayTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DayTest.php
@@ -30,18 +30,14 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAY')]
public function testDirectCallToDAY(mixed $expectedResultExcel, mixed ...$args): void
{
$result = DateParts::day(...$args);
self::assertSame($expectedResultExcel, $result);
}
- /**
- * @dataProvider providerDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAY')]
public function testDAYAsFormula(mixed $expectedResultExcel, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -53,9 +49,7 @@ public function testDAYAsFormula(mixed $expectedResultExcel, mixed ...$args): vo
self::assertSame($expectedResultExcel, $result);
}
- /**
- * @dataProvider providerDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAY')]
public function testDAYInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -78,9 +72,7 @@ public static function providerDAY(): array
return require 'tests/data/Calculation/DateTime/DAY.php';
}
- /**
- * @dataProvider providerDAYOpenOffice
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAYOpenOffice')]
public function testDirectCallToDAYOpenOffice(mixed $expectedResultOpenOffice, mixed ...$args): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -89,9 +81,7 @@ public function testDirectCallToDAYOpenOffice(mixed $expectedResultOpenOffice, m
self::assertSame($expectedResultOpenOffice, $result);
}
- /**
- * @dataProvider providerDAYOpenOffice
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAYOpenOffice')]
public function testDAYAsFormulaOpenOffice(mixed $expectedResultOpenOffice, mixed ...$args): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -110,9 +100,7 @@ public static function providerDAYOpenOffice(): array
return require 'tests/data/Calculation/DateTime/DAYOpenOffice.php';
}
- /**
- * @dataProvider providerUnhappyDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyDAY')]
public function testDAYUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -144,9 +132,7 @@ public function testDirectCallToDAYWithNull(): void
self::assertSame(0, $result);
}
- /**
- * @dataProvider providerDayArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDayArray')]
public function testDayArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/Days360Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/Days360Test.php
index 9f8c9a6088..1967b09652 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/Days360Test.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/Days360Test.php
@@ -16,18 +16,14 @@
class Days360Test extends TestCase
{
- /**
- * @dataProvider providerDAYS360
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAYS360')]
public function testDirectCallToDAYS360(mixed $expectedResult, mixed ...$args): void
{
$result = Days360::between(...$args);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerDAYS360
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAYS360')]
public function testDAYS360AsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -39,9 +35,7 @@ public function testDAYS360AsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerDAYS360
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAYS360')]
public function testDAYS360InWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -64,9 +58,7 @@ public static function providerDAYS360(): array
return require 'tests/data/Calculation/DateTime/DAYS360.php';
}
- /**
- * @dataProvider providerUnhappyDAYS360
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyDAYS360')]
public function testDAYS360UnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -99,9 +91,7 @@ public function testDateObject(): void
self::assertSame(31, Days::between($obj1, $obj2));
}
- /**
- * @dataProvider providerDays360Array
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDays360Array')]
public function testDays360Array(array $expectedResult, string $startDate, string $endDate, ?string $methods): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DaysTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DaysTest.php
index 8a783a3ec5..7ba4f5ecfe 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DaysTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/DaysTest.php
@@ -15,18 +15,14 @@
class DaysTest extends TestCase
{
- /**
- * @dataProvider providerDAYS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAYS')]
public function testDirectCallToDAYS(int|string $expectedResult, int|string $date1, int|string $date2): void
{
$result = Days::between($date1, $date2);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerDAYS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAYS')]
public function testDAYSAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -38,9 +34,7 @@ public function testDAYSAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerDAYS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDAYS')]
public function testDAYSInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -63,9 +57,7 @@ public static function providerDAYS(): array
return require 'tests/data/Calculation/DateTime/DAYS.php';
}
- /**
- * @dataProvider providerUnhappyDAYS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyDAYS')]
public function testDAYSUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -98,9 +90,7 @@ public function testDateObject(): void
self::assertSame(31, Days::between($obj1, $obj2));
}
- /**
- * @dataProvider providerDaysArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDaysArray')]
public function testDaysArray(array $expectedResult, string $startDate, string $endDate): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EDateTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EDateTest.php
index a1618cf0d0..3b5b054345 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EDateTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EDateTest.php
@@ -30,18 +30,14 @@ protected function tearDown(): void
Functions::setReturnDateType($this->returnDateType);
}
- /**
- * @dataProvider providerEDATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEDATE')]
public function testDirectCallToEDATE(mixed $expectedResult, mixed ...$args): void
{
$result = Month::adjust(...$args);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerEDATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEDATE')]
public function testEDATEAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -53,9 +49,7 @@ public function testEDATEAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerEDATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEDATE')]
public function testEDATEInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -78,9 +72,7 @@ public static function providerEDATE(): array
return require 'tests/data/Calculation/DateTime/EDATE.php';
}
- /**
- * @dataProvider providerUnhappyEDATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyEDATE')]
public function testEDATEUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -129,9 +121,7 @@ public function testEDATEtoDateTimeObject(): void
self::assertEquals($result->format('d-M-Y'), '26-Dec-2011');
}
- /**
- * @dataProvider providerEDateArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEDateArray')]
public function testEDateArray(array $expectedResult, string $dateValues, string $methods): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EoMonthTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EoMonthTest.php
index a6d5738960..1b5a747951 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EoMonthTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/EoMonthTest.php
@@ -30,18 +30,14 @@ protected function tearDown(): void
Functions::setReturnDateType($this->returnDateType);
}
- /**
- * @dataProvider providerEOMONTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEOMONTH')]
public function testDirectCallToEOMONTH(mixed $expectedResult, mixed ...$args): void
{
$result = Month::lastDay(...$args);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerEOMONTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEOMONTH')]
public function testEOMONTHAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -53,9 +49,7 @@ public function testEOMONTHAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerEOMONTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEOMONTH')]
public function testEOMONTHInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -78,9 +72,7 @@ public static function providerEOMONTH(): array
return require 'tests/data/Calculation/DateTime/EOMONTH.php';
}
- /**
- * @dataProvider providerUnhappyEOMONTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyEOMONTH')]
public function testEOMONTHUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -128,9 +120,7 @@ public function testEOMONTHtoDateTimeObject(): void
self::assertSame($result->format('d-M-Y'), '31-Dec-2011');
}
- /**
- * @dataProvider providerEoMonthArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEoMonthArray')]
public function testEoMonthArray(array $expectedResult, string $dateValues, string $methods): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/HourTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/HourTest.php
index c787aed984..0b4c27a0ea 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/HourTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/HourTest.php
@@ -13,18 +13,14 @@
class HourTest extends TestCase
{
- /**
- * @dataProvider providerHOUR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHOUR')]
public function testDirectCallToHOUR(mixed $expectedResult, mixed ...$args): void
{
$result = TimeParts::hour(...$args);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerHOUR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHOUR')]
public function testHOURAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -36,9 +32,7 @@ public function testHOURAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerHOUR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHOUR')]
public function testHOURInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -61,9 +55,7 @@ public static function providerHOUR(): array
return require 'tests/data/Calculation/DateTime/HOUR.php';
}
- /**
- * @dataProvider providerUnhappyHOUR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyHOUR')]
public function testHOURUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -89,9 +81,7 @@ public static function providerUnhappyHOUR(): array
];
}
- /**
- * @dataProvider providerHourArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHourArray')]
public function testHourArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/IsoWeekNumTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/IsoWeekNumTest.php
index b66fab6ab5..863d9f35d9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/IsoWeekNumTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/IsoWeekNumTest.php
@@ -30,18 +30,14 @@ protected function tearDown(): void
SharedDate::setExcelCalendar($this->excelCalendar);
}
- /**
- * @dataProvider providerISOWEEKNUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerISOWEEKNUM')]
public function testDirectCallToISOWEEKNUM(mixed $expectedResult, mixed ...$args): void
{
$result = Week::isoWeekNumber(...$args);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerISOWEEKNUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerISOWEEKNUM')]
public function testISOWEEKNUMAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -53,9 +49,7 @@ public function testISOWEEKNUMAsFormula(mixed $expectedResult, mixed ...$args):
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerISOWEEKNUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerISOWEEKNUM')]
public function testISOWEEKNUMInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -78,9 +72,7 @@ public static function providerISOWEEKNUM(): array
return require 'tests/data/Calculation/DateTime/ISOWEEKNUM.php';
}
- /**
- * @dataProvider providerUnhappyISOWEEKNUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyISOWEEKNUM')]
public function testISOWEEKNUMUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -106,9 +98,7 @@ public static function providerUnhappyISOWEEKNUM(): array
];
}
- /**
- * @dataProvider providerISOWEEKNUM1904
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerISOWEEKNUM1904')]
public function testISOWEEKNUMWith1904Calendar(mixed $expectedResult, mixed ...$args): void
{
SharedDate::setExcelCalendar(SharedDate::CALENDAR_MAC_1904);
@@ -122,9 +112,7 @@ public static function providerISOWEEKNUM1904(): array
return require 'tests/data/Calculation/DateTime/ISOWEEKNUM1904.php';
}
- /**
- * @dataProvider providerIsoWeekNumArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsoWeekNumArray')]
public function testIsoWeekNumArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MinuteTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MinuteTest.php
index 4e354faa26..177a684c6b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MinuteTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MinuteTest.php
@@ -13,18 +13,14 @@
class MinuteTest extends TestCase
{
- /**
- * @dataProvider providerMINUTE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMINUTE')]
public function testDirectCallToMINUTE(mixed $expectedResult, mixed ...$args): void
{
$result = TimeParts::MINUTE(...$args);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerMINUTE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMINUTE')]
public function testMINUTEAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -36,9 +32,7 @@ public function testMINUTEAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerMINUTE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMINUTE')]
public function testMINUTEInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -61,9 +55,7 @@ public static function providerMINUTE(): array
return require 'tests/data/Calculation/DateTime/MINUTE.php';
}
- /**
- * @dataProvider providerUnhappyMINUTE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyMINUTE')]
public function testMINUTEUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -89,9 +81,7 @@ public static function providerUnhappyMINUTE(): array
];
}
- /**
- * @dataProvider providerMinuteArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMinuteArray')]
public function testMinuteArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MonthTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MonthTest.php
index d3434d1d97..969d07fc00 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MonthTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/MonthTest.php
@@ -13,18 +13,14 @@
class MonthTest extends TestCase
{
- /**
- * @dataProvider providerMONTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMONTH')]
public function testDirectCallToMONTH(mixed $expectedResultExcel, mixed ...$args): void
{
$result = DateParts::month(...$args);
self::assertSame($expectedResultExcel, $result);
}
- /**
- * @dataProvider providerMONTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMONTH')]
public function testMONTHAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -36,9 +32,7 @@ public function testMONTHAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerMONTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMONTH')]
public function testMONTHInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -61,9 +55,7 @@ public static function providerMONTH(): array
return require 'tests/data/Calculation/DateTime/MONTH.php';
}
- /**
- * @dataProvider providerUnhappyMONTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyMONTH')]
public function testMONTHUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -89,9 +81,7 @@ public static function providerUnhappyMONTH(): array
];
}
- /**
- * @dataProvider providerMonthArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMonthArray')]
public function testMonthArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NetworkDaysTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NetworkDaysTest.php
index 0e853040af..a2640f38a7 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NetworkDaysTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/NetworkDaysTest.php
@@ -12,18 +12,14 @@
class NetworkDaysTest extends TestCase
{
- /**
- * @dataProvider providerNETWORKDAYS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNETWORKDAYS')]
public function testDirectCallToNETWORKDAYS(mixed $expectedResult, mixed ...$args): void
{
$result = NetworkDays::count(...$args);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerNETWORKDAYS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNETWORKDAYS')]
public function testNETWORKDAYSAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -35,9 +31,7 @@ public function testNETWORKDAYSAsFormula(mixed $expectedResult, mixed ...$args):
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerNETWORKDAYS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNETWORKDAYS')]
public function testNETWORKDAYSInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +54,7 @@ public static function providerNETWORKDAYS(): array
return require 'tests/data/Calculation/DateTime/NETWORKDAYS.php';
}
- /**
- * @dataProvider providerUnhappyNETWORKDAYS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyNETWORKDAYS')]
public function testNETWORKDAYSUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -89,9 +81,7 @@ public static function providerUnhappyNETWORKDAYS(): array
];
}
- /**
- * @dataProvider providerNetWorkDaysArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNetWorkDaysArray')]
public function testNetWorkDaysArray(array $expectedResult, string $startDate, string $endDays, ?string $holidays): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/SecondTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/SecondTest.php
index 72f9ccb605..1510449607 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/SecondTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/SecondTest.php
@@ -12,18 +12,14 @@
class SecondTest extends TestCase
{
- /**
- * @dataProvider providerSECOND
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSECOND')]
public function testDirectCallToSECOND(mixed $expectedResult, mixed ...$args): void
{
$result = TimeParts::second(...$args);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerSECOND
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSECOND')]
public function testSECONDAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -35,9 +31,7 @@ public function testSECONDAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerSECOND
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSECOND')]
public function testSECONDInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +54,7 @@ public static function providerSECOND(): array
return require 'tests/data/Calculation/DateTime/SECOND.php';
}
- /**
- * @dataProvider providerUnhappySECOND
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappySECOND')]
public function testSECONDUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +80,7 @@ public static function providerUnhappySECOND(): array
];
}
- /**
- * @dataProvider providerSecondArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSecondArray')]
public function testSecondArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeTest.php
index 3f757315b3..71e5e02f79 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeTest.php
@@ -36,18 +36,14 @@ protected function tearDown(): void
Functions::setReturnDateType($this->returnDateType);
}
- /**
- * @dataProvider providerTIME
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTIME')]
public function testDirectCallToTIME(float|string $expectedResult, int|string $hour, bool|int $minute, int $second): void
{
$result = Time::fromHMS($hour, $minute, $second);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-12);
}
- /**
- * @dataProvider providerTIME
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTIME')]
public function testTIMEAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -64,9 +60,7 @@ public static function providerTIME(): array
return require 'tests/data/Calculation/DateTime/TIME.php';
}
- /**
- * @dataProvider providerUnhappyTIME
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyTIME')]
public function testTIMEUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -127,9 +121,7 @@ public function testTIME1900(): void
self::assertEquals(0, $result);
}
- /**
- * @dataProvider providerTimeArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTimeArray')]
public function testTimeArray(array $expectedResult, string $hour, string $minute, string $second): void
{
$calculation = Calculation::getInstance();
@@ -193,9 +185,7 @@ public static function providerTimeArray(): array
];
}
- /**
- * @dataProvider providerTimeArrayException
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTimeArrayException')]
public function testTimeArrayException(string $hour, string $minute, string $second): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeValueTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeValueTest.php
index f512d4c458..769254e596 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeValueTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/TimeValueTest.php
@@ -30,18 +30,14 @@ protected function tearDown(): void
Functions::setReturnDateType($this->returnDateType);
}
- /**
- * @dataProvider providerTIMEVALUE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTIMEVALUE')]
public function testDirectCallToTIMEVALUE(int|float|string $expectedResult, bool|int|string $value): void
{
$result = TimeValue::fromString($value);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);
}
- /**
- * @dataProvider providerTIMEVALUE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTIMEVALUE')]
public function testTIMEVALUEAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -53,9 +49,7 @@ public function testTIMEVALUEAsFormula(mixed $expectedResult, mixed ...$args): v
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-8);
}
- /**
- * @dataProvider providerTIMEVALUE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTIMEVALUE')]
public function testTIMEVALUEInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -109,9 +103,7 @@ public function testTIMEVALUEtoDateTimeObject(): void
self::assertEquals($result->format('H:i:s'), '07:30:20');
}
- /**
- * @dataProvider providerUnhappyTIMEVALUE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyTIMEVALUE')]
public function testTIMEVALUEUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -137,9 +129,7 @@ public static function providerUnhappyTIMEVALUE(): array
];
}
- /**
- * @dataProvider providerTimeValueArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTimeValueArray')]
public function testTimeValueArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekDayTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekDayTest.php
index c147b84464..f97be1ec50 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekDayTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekDayTest.php
@@ -29,18 +29,14 @@ protected function tearDown(): void
SharedDate::setExcelCalendar($this->excelCalendar);
}
- /**
- * @dataProvider providerWEEKDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWEEKDAY')]
public function testDirectCallToWEEKDAY(int|string $expectedResult, bool|int|string $dateValue, null|int|string $style = null): void
{
$result = ($style === null) ? Week::day($dateValue) : Week::day($dateValue, $style);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerWEEKDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWEEKDAY')]
public function testWEEKDAYAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -52,9 +48,7 @@ public function testWEEKDAYAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerWEEKDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWEEKDAY')]
public function testWEEKDAYInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -77,9 +71,7 @@ public static function providerWEEKDAY(): array
return require 'tests/data/Calculation/DateTime/WEEKDAY.php';
}
- /**
- * @dataProvider providerUnhappyWEEKDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyWEEKDAY')]
public function testWEEKDAYUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -114,9 +106,7 @@ public function testWEEKDAYWith1904Calendar(): void
self::assertEquals(6, Week::day(null));
}
- /**
- * @dataProvider providerWeekDayArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWeekDayArray')]
public function testWeekDayArray(array $expectedResult, string $dateValues, string $styles): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekNumTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekNumTest.php
index bff6ec6197..a08c13a065 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekNumTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WeekNumTest.php
@@ -30,18 +30,14 @@ protected function tearDown(): void
SharedDate::setExcelCalendar($this->excelCalendar);
}
- /**
- * @dataProvider providerWEEKNUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWEEKNUM')]
public function testDirectCallToWEEKNUM(mixed $expectedResult, mixed ...$args): void
{
$result = Week::number(...$args);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerWEEKNUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWEEKNUM')]
public function testWEEKNUMAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -53,9 +49,7 @@ public function testWEEKNUMAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerWEEKNUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWEEKNUM')]
public function testWEEKNUMInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -78,9 +72,7 @@ public static function providerWEEKNUM(): array
return require 'tests/data/Calculation/DateTime/WEEKNUM.php';
}
- /**
- * @dataProvider providerUnhappyWEEKNUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyWEEKNUM')]
public function testWEEKNUMUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -106,9 +98,7 @@ public static function providerUnhappyWEEKNUM(): array
];
}
- /**
- * @dataProvider providerWEEKNUM1904
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWEEKNUM1904')]
public function testWEEKNUMWith1904Calendar(mixed $expectedResult, mixed ...$args): void
{
SharedDate::setExcelCalendar(SharedDate::CALENDAR_MAC_1904);
@@ -122,9 +112,7 @@ public static function providerWEEKNUM1904(): array
return require 'tests/data/Calculation/DateTime/WEEKNUM1904.php';
}
- /**
- * @dataProvider providerWeekNumArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWeekNumArray')]
public function testWeekNumArray(array $expectedResult, string $dateValues, string $methods): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WorkDayTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WorkDayTest.php
index db9d95d172..06c65ff6d3 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WorkDayTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/WorkDayTest.php
@@ -12,18 +12,14 @@
class WorkDayTest extends TestCase
{
- /**
- * @dataProvider providerWORKDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWORKDAY')]
public function testDirectCallToWORKDAY(mixed $expectedResult, mixed ...$args): void
{
$result = WorkDay::date(...$args);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerWORKDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWORKDAY')]
public function testWORKDAYAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -35,9 +31,7 @@ public function testWORKDAYAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerWORKDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWORKDAY')]
public function testWORKDAYInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +54,7 @@ public static function providerWORKDAY(): array
return require 'tests/data/Calculation/DateTime/WORKDAY.php';
}
- /**
- * @dataProvider providerUnhappyWORKDAY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyWORKDAY')]
public function testWORKDAYUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +80,7 @@ public static function providerUnhappyWORKDAY(): array
];
}
- /**
- * @dataProvider providerWorkDayArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWorkDayArray')]
public function testWorkDayArray(array $expectedResult, string $startDate, string $endDays, ?string $holidays): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearFracTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearFracTest.php
index 74157492a2..0ad70f9543 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearFracTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearFracTest.php
@@ -13,18 +13,14 @@
class YearFracTest extends TestCase
{
- /**
- * @dataProvider providerYEARFRAC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerYEARFRAC')]
public function testDirectCallToYEARFRAC(mixed $expectedResult, mixed ...$args): void
{
$result = YearFrac::fraction(...$args);
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6);
}
- /**
- * @dataProvider providerYEARFRAC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerYEARFRAC')]
public function testYEARFRACAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -36,9 +32,7 @@ public function testYEARFRACAsFormula(mixed $expectedResult, mixed ...$args): vo
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-6);
}
- /**
- * @dataProvider providerYEARFRAC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerYEARFRAC')]
public function testYEARFRACInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -61,9 +55,7 @@ public static function providerYEARFRAC(): array
return require 'tests/data/Calculation/DateTime/YEARFRAC.php';
}
- /**
- * @dataProvider providerUnhappyYEARFRAC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyYEARFRAC')]
public function testYEARFRACUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -90,9 +82,7 @@ public static function providerUnhappyYEARFRAC(): array
];
}
- /**
- * @dataProvider providerYearFracArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerYearFracArray')]
public function testYearFracArray(array $expectedResult, string $startDate, string $endDate, ?string $methods): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearTest.php
index 6234900e5b..6a7f5a095a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/DateTime/YearTest.php
@@ -12,18 +12,14 @@
class YearTest extends TestCase
{
- /**
- * @dataProvider providerYEAR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerYEAR')]
public function testDirectCallToYEAR(mixed $expectedResultExcel, mixed ...$args): void
{
$result = DateParts::year(...$args);
self::assertSame($expectedResultExcel, $result);
}
- /**
- * @dataProvider providerYEAR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerYEAR')]
public function testYEARAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -35,9 +31,7 @@ public function testYEARAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerYEAR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerYEAR')]
public function testYEARInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +54,7 @@ public static function providerYEAR(): array
return require 'tests/data/Calculation/DateTime/YEAR.php';
}
- /**
- * @dataProvider providerUnhappyYEAR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyYEAR')]
public function testYEARUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +80,7 @@ public static function providerUnhappyYEAR(): array
];
}
- /**
- * @dataProvider providerYearArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerYearArray')]
public function testYearArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselITest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselITest.php
index 8a659358c8..603f23533c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselITest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselITest.php
@@ -15,18 +15,14 @@ class BesselITest extends TestCase
{
const BESSEL_PRECISION = 1E-9;
- /**
- * @dataProvider providerBESSELI
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELI')]
public function testDirectCallToBESSELI(mixed $expectedResult, mixed ...$args): void
{
$result = BesselI::besselI(...$args);
self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);
}
- /**
- * @dataProvider providerBESSELI
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELI')]
public function testBESSELIAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -38,9 +34,7 @@ public function testBESSELIAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);
}
- /**
- * @dataProvider providerBESSELI
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELI')]
public function testBESSELIInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -63,9 +57,7 @@ public static function providerBESSELI(): array
return require 'tests/data/Calculation/Engineering/BESSELI.php';
}
- /**
- * @dataProvider providerUnhappyBESSELI
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBESSELI')]
public function testBESSELIUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -92,9 +84,7 @@ public static function providerUnhappyBESSELI(): array
];
}
- /**
- * @dataProvider providerBesselIArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBesselIArray')]
public function testBesselIArray(array $expectedResult, string $value, string $ord): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselJTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselJTest.php
index ce8930505b..a4b3b1dd06 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselJTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselJTest.php
@@ -15,18 +15,14 @@ class BesselJTest extends TestCase
{
const BESSEL_PRECISION = 1E-8;
- /**
- * @dataProvider providerBESSELJ
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELJ')]
public function testDirectCallToBESSELJ(mixed $expectedResult, mixed ...$args): void
{
$result = BesselJ::besselJ(...$args);
self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);
}
- /**
- * @dataProvider providerBESSELJ
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELJ')]
public function testBESSELJAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -38,9 +34,7 @@ public function testBESSELJAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);
}
- /**
- * @dataProvider providerBESSELJ
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELJ')]
public function testBESSELJInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -63,9 +57,7 @@ public static function providerBESSELJ(): array
return require 'tests/data/Calculation/Engineering/BESSELJ.php';
}
- /**
- * @dataProvider providerUnhappyBESSELJ
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBESSELJ')]
public function testBESSELJUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -92,9 +84,7 @@ public static function providerUnhappyBESSELJ(): array
];
}
- /**
- * @dataProvider providerBesselJArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBesselJArray')]
public function testBesselJArray(array $expectedResult, string $value, string $ord): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselKTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselKTest.php
index 8a17b5c824..a810c3133e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselKTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselKTest.php
@@ -15,18 +15,14 @@ class BesselKTest extends TestCase
{
const BESSEL_PRECISION = 1E-12;
- /**
- * @dataProvider providerBESSELK
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELK')]
public function testDirectCallToBESSELK(mixed $expectedResult, mixed ...$args): void
{
$result = BesselK::besselK(...$args);
self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);
}
- /**
- * @dataProvider providerBESSELK
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELK')]
public function testBESSELKAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -38,9 +34,7 @@ public function testBESSELKAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);
}
- /**
- * @dataProvider providerBESSELK
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELK')]
public function testBESSELKInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -63,9 +57,7 @@ public static function providerBESSELK(): array
return require 'tests/data/Calculation/Engineering/BESSELK.php';
}
- /**
- * @dataProvider providerUnhappyBESSELK
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBESSELK')]
public function testBESSELKUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -92,9 +84,7 @@ public static function providerUnhappyBESSELK(): array
];
}
- /**
- * @dataProvider providerBesselKArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBesselKArray')]
public function testBesselKArray(array $expectedResult, string $value, string $ord): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselYTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselYTest.php
index 598cd95a77..bbd9e58d25 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselYTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BesselYTest.php
@@ -15,18 +15,14 @@ class BesselYTest extends TestCase
{
const BESSEL_PRECISION = 1E-12;
- /**
- * @dataProvider providerBESSELY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELY')]
public function testDirectCallToBESSELY(mixed $expectedResult, mixed ...$args): void
{
$result = BesselY::besselY(...$args);
self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);
}
- /**
- * @dataProvider providerBESSELY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELY')]
public function testBESSELYAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -38,9 +34,7 @@ public function testBESSELYAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertEqualsWithDelta($expectedResult, $result, self::BESSEL_PRECISION);
}
- /**
- * @dataProvider providerBESSELY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBESSELY')]
public function testBESSELYInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -63,9 +57,7 @@ public static function providerBESSELY(): array
return require 'tests/data/Calculation/Engineering/BESSELY.php';
}
- /**
- * @dataProvider providerUnhappyBESSELY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBESSELY')]
public function testBESSELYUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -92,9 +84,7 @@ public static function providerUnhappyBESSELY(): array
];
}
- /**
- * @dataProvider providerBesselYArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBesselYArray')]
public function testBesselYArray(array $expectedResult, string $value, string $ord): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2DecTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2DecTest.php
index 1f4c1ad372..afcbb9a0c3 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2DecTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2DecTest.php
@@ -27,9 +27,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerBIN2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2DEC')]
public function testDirectCallToBIN2DEC(string $expectedResult, bool|int|string $arg1): void
{
$result = ConvertBinary::toDecimal($arg1);
@@ -41,9 +39,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerBIN2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2DEC')]
public function testBIN2DECAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -56,9 +52,7 @@ public function testBIN2DECAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerBIN2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2DEC')]
public function testBIN2DECInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -81,9 +75,7 @@ public static function providerBIN2DEC(): array
return require 'tests/data/Calculation/Engineering/BIN2DEC.php';
}
- /**
- * @dataProvider providerUnhappyBIN2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBIN2DEC')]
public function testBIN2DECUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -109,9 +101,7 @@ public static function providerUnhappyBIN2DEC(): array
];
}
- /**
- * @dataProvider providerBIN2DECOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2DECOds')]
public function testBIN2DECOds(string $expectedResult, bool $arg1): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -146,9 +136,7 @@ public function testBIN2DECFractional(): void
self::assertSame(ExcelError::NAN(), $this->trimIfQuoted((string) $result), 'Excel');
}
- /**
- * @dataProvider providerBin2DecArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBin2DecArray')]
public function testBin2DecArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2HexTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2HexTest.php
index b2cf5bc406..8afcdf6615 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2HexTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2HexTest.php
@@ -27,9 +27,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerBIN2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2HEX')]
public function testDirectCallToBIN2HEX(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void
{
$result = ($digits === null) ? ConvertBinary::toHex($value) : ConvertBinary::toHex($value, $digits);
@@ -41,9 +39,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerBIN2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2HEX')]
public function testBIN2HEXAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -56,9 +52,7 @@ public function testBIN2HEXAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerBIN2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2HEX')]
public function testBIN2HEXInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -81,9 +75,7 @@ public static function providerBIN2HEX(): array
return require 'tests/data/Calculation/Engineering/BIN2HEX.php';
}
- /**
- * @dataProvider providerUnhappyBIN2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBIN2HEX')]
public function testBIN2HEXUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -109,9 +101,7 @@ public static function providerUnhappyBIN2HEX(): array
];
}
- /**
- * @dataProvider providerBIN2HEXOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2HEXOds')]
public function testBIN2HEXOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -146,9 +136,7 @@ public function testBIN2HEXFractional(): void
self::assertSame(ExcelError::NAN(), $this->trimIfQuoted((string) $result), 'Excel');
}
- /**
- * @dataProvider providerBin2HexArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBin2HexArray')]
public function testBin2HexArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2OctTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2OctTest.php
index f0db0c1fbd..2c320f4885 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2OctTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Bin2OctTest.php
@@ -27,9 +27,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerBIN2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2OCT')]
public function testDirectCallToBIN2OCT(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void
{
$result = ($digits === null) ? ConvertBinary::toOctal($value) : ConvertBinary::toOctal($value, $digits);
@@ -41,9 +39,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerBIN2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2OCT')]
public function testBIN2OCTAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -56,9 +52,7 @@ public function testBIN2OCTAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerBIN2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2OCT')]
public function testBIN2OCTInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -81,9 +75,7 @@ public static function providerBIN2OCT(): array
return require 'tests/data/Calculation/Engineering/BIN2OCT.php';
}
- /**
- * @dataProvider providerUnhappyBIN2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBIN2OCT')]
public function testBIN2OCTUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -109,9 +101,7 @@ public static function providerUnhappyBIN2OCT(): array
];
}
- /**
- * @dataProvider providerBIN2OCTOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBIN2OCTOds')]
public function testBIN2OCTOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -146,9 +136,7 @@ public function testBIN2OCTFractional(): void
self::assertSame(ExcelError::NAN(), $this->trimIfQuoted((string) $result), 'Excel');
}
- /**
- * @dataProvider providerBin2OctArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBin2OctArray')]
public function testBin2OctArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitAndTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitAndTest.php
index 1f913cbed8..4ad529b266 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitAndTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitAndTest.php
@@ -13,18 +13,14 @@
class BitAndTest extends TestCase
{
- /**
- * @dataProvider providerBITAND
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITAND')]
public function testDirectCallToBITAND(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void
{
$result = BitWise::BITAND($arg1, $arg2);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerBITAND
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITAND')]
public function testBITANDAsFormula(float|int|string $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -36,9 +32,7 @@ public function testBITANDAsFormula(float|int|string $expectedResult, mixed ...$
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerBITAND
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITAND')]
public function testBITANDInWorksheet(float|int|string $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -61,9 +55,7 @@ public static function providerBITAND(): array
return require 'tests/data/Calculation/Engineering/BITAND.php';
}
- /**
- * @dataProvider providerUnhappyBITAND
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBITAND')]
public function testBITANDUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -90,9 +82,7 @@ public static function providerUnhappyBITAND(): array
];
}
- /**
- * @dataProvider providerBitAndArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBitAndArray')]
public function testBitAndArray(array $expectedResult, string $number1, string $number2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitLShiftTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitLShiftTest.php
index a0bd6b7583..82d1f749d1 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitLShiftTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitLShiftTest.php
@@ -13,18 +13,14 @@
class BitLShiftTest extends TestCase
{
- /**
- * @dataProvider providerBITLSHIFT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITLSHIFT')]
public function testDirectCallToBITLSHIFT(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void
{
$result = BitWise::BITLSHIFT($arg1, $arg2);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerBITLSHIFT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITLSHIFT')]
public function testBITLSHIFTAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -36,9 +32,7 @@ public function testBITLSHIFTAsFormula(mixed $expectedResult, mixed ...$args): v
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerBITLSHIFT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITLSHIFT')]
public function testBITLSHIFTInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -61,9 +55,7 @@ public static function providerBITLSHIFT(): array
return require 'tests/data/Calculation/Engineering/BITLSHIFT.php';
}
- /**
- * @dataProvider providerUnhappyBITLSHIFT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBITLSHIFT')]
public function testBITLSHIFTUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -90,9 +82,7 @@ public static function providerUnhappyBITLSHIFT(): array
];
}
- /**
- * @dataProvider providerBitLShiftArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBitLShiftArray')]
public function testBitLShiftArray(array $expectedResult, string $number, string $bits): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitOrTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitOrTest.php
index f27f731f3c..6cc1390190 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitOrTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitOrTest.php
@@ -13,18 +13,14 @@
class BitOrTest extends TestCase
{
- /**
- * @dataProvider providerBITOR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITOR')]
public function testDirectCallToBITOR(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void
{
$result = BitWise::BITOR($arg1, $arg2);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerBITOR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITOR')]
public function testBITORAsFormula(float|int|string $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -36,9 +32,7 @@ public function testBITORAsFormula(float|int|string $expectedResult, mixed ...$a
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerBITOR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITOR')]
public function testBITORInWorksheet(float|int|string $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -61,9 +55,7 @@ public static function providerBITOR(): array
return require 'tests/data/Calculation/Engineering/BITOR.php';
}
- /**
- * @dataProvider providerUnhappyBITOR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBITOR')]
public function testBITORUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -90,9 +82,7 @@ public static function providerUnhappyBITOR(): array
];
}
- /**
- * @dataProvider providerBitOrArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBitOrArray')]
public function testBitOrArray(array $expectedResult, string $number1, string $number2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitRShiftTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitRShiftTest.php
index e68173e361..084932a6bb 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitRShiftTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitRShiftTest.php
@@ -13,18 +13,14 @@
class BitRShiftTest extends TestCase
{
- /**
- * @dataProvider providerBITRSHIFT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITRSHIFT')]
public function testDirectCallToBITRSHIFT(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void
{
$result = BitWise::BITRSHIFT($arg1, $arg2);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerBITRSHIFT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITRSHIFT')]
public function testBITRSHIFTAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -36,9 +32,7 @@ public function testBITRSHIFTAsFormula(mixed $expectedResult, mixed ...$args): v
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerBITRSHIFT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITRSHIFT')]
public function testBITRSHIFTInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -61,9 +55,7 @@ public static function providerBITRSHIFT(): array
return require 'tests/data/Calculation/Engineering/BITRSHIFT.php';
}
- /**
- * @dataProvider providerUnhappyBITRSHIFT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBITRSHIFT')]
public function testBITRSHIFTUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -90,9 +82,7 @@ public static function providerUnhappyBITRSHIFT(): array
];
}
- /**
- * @dataProvider providerBitRShiftArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBitRShiftArray')]
public function testBitRShiftArray(array $expectedResult, string $number, string $bits): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitXorTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitXorTest.php
index 1c42c0f041..38b59b59d1 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitXorTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/BitXorTest.php
@@ -13,18 +13,14 @@
class BitXorTest extends TestCase
{
- /**
- * @dataProvider providerBITXOR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITXOR')]
public function testDirectCallToBITXOR(float|int|string $expectedResult, null|bool|int|float|string $arg1, null|bool|int|float|string $arg2): void
{
$result = BitWise::BITXOR($arg1, $arg2);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerBITXOR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITXOR')]
public function testBITXORAsFormula(float|int|string $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -36,9 +32,7 @@ public function testBITXORAsFormula(float|int|string $expectedResult, mixed ...$
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerBITXOR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBITXOR')]
public function testBITXORInWorksheet(float|int|string $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -61,9 +55,7 @@ public static function providerBITXOR(): array
return require 'tests/data/Calculation/Engineering/BITXOR.php';
}
- /**
- * @dataProvider providerUnhappyBITXOR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyBITXOR')]
public function testBITXORUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -90,9 +82,7 @@ public static function providerUnhappyBITXOR(): array
];
}
- /**
- * @dataProvider providerBitXorArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBitXorArray')]
public function testBitXorArray(array $expectedResult, string $number1, string $number2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ComplexTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ComplexTest.php
index 17954601bc..1a5933e342 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ComplexTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ComplexTest.php
@@ -12,9 +12,7 @@
class ComplexTest extends TestCase
{
- /**
- * @dataProvider providerCOMPLEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOMPLEX')]
public function testDirectCallToCOMPLEX(mixed $expectedResult, mixed ...$args): void
{
$result = Complex::complex(...$args);
@@ -26,9 +24,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerCOMPLEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOMPLEX')]
public function testCOMPLEXAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -41,9 +37,7 @@ public function testCOMPLEXAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerCOMPLEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOMPLEX')]
public function testCOMPLEXInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -66,9 +60,7 @@ public static function providerCOMPLEX(): array
return require 'tests/data/Calculation/Engineering/COMPLEX.php';
}
- /**
- * @dataProvider providerComplexArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerComplexArray')]
public function testComplexArray(array $expectedResult, string $real, string $imaginary): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ConvertUoMTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ConvertUoMTest.php
index e8044792ad..ad30125d9e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ConvertUoMTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ConvertUoMTest.php
@@ -51,18 +51,14 @@ public function testGetBinaryConversionMultipliers(): void
self::assertSame(['multiplier' => 1024, 'name' => 'kibi'], $result['ki']);
}
- /**
- * @dataProvider providerCONVERTUOM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCONVERTUOM')]
public function testDirectCallToCONVERTUOM(float|int|string $expectedResult, float|int|string $value, string $from, string $to): void
{
$result = ConvertUOM::convert($value, $from, $to);
self::assertEqualsWithDelta($expectedResult, $result, self::UOM_PRECISION);
}
- /**
- * @dataProvider providerCONVERTUOM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCONVERTUOM')]
public function testCONVERTUOMAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -74,9 +70,7 @@ public function testCONVERTUOMAsFormula(mixed $expectedResult, mixed ...$args):
self::assertEqualsWithDelta($expectedResult, $result, self::UOM_PRECISION);
}
- /**
- * @dataProvider providerCONVERTUOM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCONVERTUOM')]
public function testCONVERTUOMInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -99,9 +93,7 @@ public static function providerCONVERTUOM(): array
return require 'tests/data/Calculation/Engineering/CONVERTUOM.php';
}
- /**
- * @dataProvider providerUnhappyCONVERTUOM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyCONVERTUOM')]
public function testCONVERTUOMUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -129,9 +121,7 @@ public static function providerUnhappyCONVERTUOM(): array
];
}
- /**
- * @dataProvider providerConvertUoMArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerConvertUoMArray')]
public function testConvertUoMArray(array $expectedResult, string $value, string $fromUoM, string $toUoM): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2BinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2BinTest.php
index 51f73261fb..cdee5b47fb 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2BinTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2BinTest.php
@@ -26,9 +26,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerDEC2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2BIN')]
public function testDirectCallToDEC2BIN(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void
{
$result = ($digits === null) ? ConvertDecimal::toBinary($value) : ConvertDecimal::toBinary($value, $digits);
@@ -40,9 +38,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerDEC2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2BIN')]
public function testDEC2BINAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -55,9 +51,7 @@ public function testDEC2BINAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerDEC2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2BIN')]
public function testDEC2BINInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -80,9 +74,7 @@ public static function providerDEC2BIN(): array
return require 'tests/data/Calculation/Engineering/DEC2BIN.php';
}
- /**
- * @dataProvider providerUnhappyDEC2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyDEC2BIN')]
public function testDEC2BINUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -108,9 +100,7 @@ public static function providerUnhappyDEC2BIN(): array
];
}
- /**
- * @dataProvider providerDEC2BINOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2BINOds')]
public function testDEC2BINOds(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -145,9 +135,7 @@ public function testDEC2BINFrac(): void
self::assertSame('101', $this->trimIfQuoted((string) $result), 'Excel');
}
- /**
- * @dataProvider providerDec2BinArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDec2BinArray')]
public function testDec2BinArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2HexTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2HexTest.php
index 2be971d815..03a129b06f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2HexTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2HexTest.php
@@ -26,9 +26,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerDEC2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2HEX')]
public function testDirectCallToDEC2HEX(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void
{
$result = ($digits === null) ? ConvertDecimal::toHex($value) : ConvertDecimal::toHex($value, $digits);
@@ -40,9 +38,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerDEC2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2HEX')]
public function testDEC2HEXAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -55,9 +51,7 @@ public function testDEC2HEXAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerDEC2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2HEX')]
public function testDEC2HEXInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -80,9 +74,7 @@ public static function providerDEC2HEX(): array
return require 'tests/data/Calculation/Engineering/DEC2HEX.php';
}
- /**
- * @dataProvider providerUnhappyDEC2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyDEC2HEX')]
public function testDEC2HEXUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -108,9 +100,7 @@ public static function providerUnhappyDEC2HEX(): array
];
}
- /**
- * @dataProvider providerDEC2HEXOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2HEXOds')]
public function testDEC2HEXOds(mixed $expectedResult, bool|float|int|string $value, null|float|int|string $digits = null): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -152,9 +142,7 @@ public function test32bitHex(): void
self::assertEquals('FFFFFFFFFF', ConvertDecimal::hex32bit(-1, 'FFFFFFFF', true));
}
- /**
- * @dataProvider providerDec2HexArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDec2HexArray')]
public function testDec2HexArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2OctTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2OctTest.php
index 3207107011..b99fa9e27c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2OctTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Dec2OctTest.php
@@ -26,9 +26,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerDEC2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2OCT')]
public function testDirectCallToDEC2OCT(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
$result = ($digits === null) ? ConvertDecimal::toOctal($value) : ConvertDecimal::toOctal($value, $digits);
@@ -40,9 +38,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerDEC2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2OCT')]
public function testDEC2OCTAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -55,9 +51,7 @@ public function testDEC2OCTAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerDEC2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2OCT')]
public function testDEC2OCTInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -80,9 +74,7 @@ public static function providerDEC2OCT(): array
return require 'tests/data/Calculation/Engineering/DEC2OCT.php';
}
- /**
- * @dataProvider providerUnhappyDEC2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyDEC2OCT')]
public function testDEC2OCTUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -108,9 +100,7 @@ public static function providerUnhappyDEC2OCT(): array
];
}
- /**
- * @dataProvider providerDEC2OCTOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEC2OCTOds')]
public function testDEC2OCTOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -145,9 +135,7 @@ public function testDEC2OCTFrac(): void
self::assertSame('21', $this->trimIfQuoted((string) $result), 'Excel');
}
- /**
- * @dataProvider providerDec2OctArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDec2OctArray')]
public function testDec2OctArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/DeltaTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/DeltaTest.php
index 6dbd164ec4..54c0eb8f18 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/DeltaTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/DeltaTest.php
@@ -13,18 +13,14 @@
class DeltaTest extends TestCase
{
- /**
- * @dataProvider providerDELTA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDELTA')]
public function testDirectCallToDELTA(mixed $expectedResult, bool|float|int|string $arg1, null|bool|float|int|string $arg2 = null): void
{
$result = ($arg2 === null) ? Compare::delta($arg1) : Compare::delta($arg1, $arg2);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerDELTA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDELTA')]
public function testDELTAAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -36,9 +32,7 @@ public function testDELTAAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerDELTA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDELTA')]
public function testDELTAInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -61,9 +55,7 @@ public static function providerDELTA(): array
return require 'tests/data/Calculation/Engineering/DELTA.php';
}
- /**
- * @dataProvider providerUnhappyDELTA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyDELTA')]
public function testDELTAUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -89,9 +81,7 @@ public static function providerUnhappyDELTA(): array
];
}
- /**
- * @dataProvider providerDeltaArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDeltaArray')]
public function testDeltaArray(array $expectedResult, string $a, string $b): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfCTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfCTest.php
index 515fe9e8f8..2b4927c0e6 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfCTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfCTest.php
@@ -15,18 +15,14 @@ class ErfCTest extends TestCase
{
const ERF_PRECISION = 1E-14;
- /**
- * @dataProvider providerERFC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerERFC')]
public function testDirectCallToERFC(mixed $expectedResult, mixed ...$args): void
{
$result = ErfC::ERFC(...$args);
self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);
}
- /**
- * @dataProvider providerERFC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerERFC')]
public function testERFCAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -38,9 +34,7 @@ public function testERFCAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);
}
- /**
- * @dataProvider providerERFC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerERFC')]
public function testERFCInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -63,9 +57,7 @@ public static function providerERFC(): array
return require 'tests/data/Calculation/Engineering/ERFC.php';
}
- /**
- * @dataProvider providerUnhappyERFC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyERFC')]
public function testERFCUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -91,9 +83,7 @@ public static function providerUnhappyERFC(): array
];
}
- /**
- * @dataProvider providerErfCArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerErfCArray')]
public function testErfCArray(array $expectedResult, string $lower): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfPreciseTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfPreciseTest.php
index edc59284aa..1dd8ab8dee 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfPreciseTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfPreciseTest.php
@@ -14,18 +14,14 @@ class ErfPreciseTest extends TestCase
{
const ERF_PRECISION = 1E-14;
- /**
- * @dataProvider providerERFPRECISE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerERFPRECISE')]
public function testDirectCallToERFPRECISE(mixed $expectedResult, mixed ...$args): void
{
$result = Erf::ERFPRECISE(...$args);
self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);
}
- /**
- * @dataProvider providerERFPRECISE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerERFPRECISE')]
public function testERFPRECISEAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -37,9 +33,7 @@ public function testERFPRECISEAsFormula(mixed $expectedResult, mixed ...$args):
self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);
}
- /**
- * @dataProvider providerERFPRECISE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerERFPRECISE')]
public function testERFPRECISEInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -62,9 +56,7 @@ public static function providerERFPRECISE(): array
return require 'tests/data/Calculation/Engineering/ERFPRECISE.php';
}
- /**
- * @dataProvider providerErfPreciseArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerErfPreciseArray')]
public function testErfPreciseArray(array $expectedResult, string $limit): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfTest.php
index e9d239238a..7fd9bcb33c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ErfTest.php
@@ -15,18 +15,14 @@ class ErfTest extends TestCase
{
const ERF_PRECISION = 1E-14;
- /**
- * @dataProvider providerERF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerERF')]
public function testDirectCallToERF(mixed $expectedResult, mixed ...$args): void
{
$result = Erf::erf(...$args);
self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);
}
- /**
- * @dataProvider providerERF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerERF')]
public function testERFAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -38,9 +34,7 @@ public function testERFAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertEqualsWithDelta($expectedResult, $result, self::ERF_PRECISION);
}
- /**
- * @dataProvider providerERF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerERF')]
public function testERFInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -63,9 +57,7 @@ public static function providerERF(): array
return require 'tests/data/Calculation/Engineering/ERF.php';
}
- /**
- * @dataProvider providerUnhappyERF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyERF')]
public function testERFUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -91,9 +83,7 @@ public static function providerUnhappyERF(): array
];
}
- /**
- * @dataProvider providerErfArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerErfArray')]
public function testErfArray(array $expectedResult, string $lower, string $upper = 'NULL'): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/GeStepTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/GeStepTest.php
index 34b42ceaef..f39a8cbdfa 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/GeStepTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/GeStepTest.php
@@ -13,18 +13,14 @@
class GeStepTest extends TestCase
{
- /**
- * @dataProvider providerGESTEP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGESTEP')]
public function testDirectCallToGESTEP(int|string $expectedResult, bool|float|int|string $arg1, null|bool|float|int|string $arg2 = null): void
{
$result = ($arg2 === null) ? Compare::geStep($arg1) : Compare::geStep($arg1, $arg2);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerGESTEP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGESTEP')]
public function testGESTEPAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -36,9 +32,7 @@ public function testGESTEPAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerGESTEP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGESTEP')]
public function testGESTEPInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -61,9 +55,7 @@ public static function providerGESTEP(): array
return require 'tests/data/Calculation/Engineering/GESTEP.php';
}
- /**
- * @dataProvider providerUnhappyGESTEP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyGESTEP')]
public function testGESTEPUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -89,9 +81,7 @@ public static function providerUnhappyGESTEP(): array
];
}
- /**
- * @dataProvider providerGeStepArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGeStepArray')]
public function testGeStepArray(array $expectedResult, string $a, string $b): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2BinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2BinTest.php
index bcd263235d..abbe317120 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2BinTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2BinTest.php
@@ -27,9 +27,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerHEX2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2BIN')]
public function testDirectCallToHEX2BIN(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
$result = ($digits === null) ? ConvertHex::toBinary($value) : ConvertHex::toBinary($value, $digits);
@@ -41,9 +39,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerHEX2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2BIN')]
public function testHEX2BINAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -56,9 +52,7 @@ public function testHEX2BINAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerHEX2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2BIN')]
public function testHEX2BINInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -81,9 +75,7 @@ public static function providerHEX2BIN(): array
return require 'tests/data/Calculation/Engineering/HEX2BIN.php';
}
- /**
- * @dataProvider providerUnhappyHEX2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyHEX2BIN')]
public function testHEX2BINUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -109,9 +101,7 @@ public static function providerUnhappyHEX2BIN(): array
];
}
- /**
- * @dataProvider providerHEX2BINOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2BINOds')]
public function testHEX2BINOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -146,9 +136,7 @@ public function testHEX2BINFrac(): void
self::assertSame(ExcelError::NAN(), $this->trimIfQuoted((string) $result), 'Excel');
}
- /**
- * @dataProvider providerHex2BinArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHex2BinArray')]
public function testHex2BinArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2DecTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2DecTest.php
index 7586b43ea5..888fba09df 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2DecTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2DecTest.php
@@ -27,9 +27,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerHEX2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2DEC')]
public function testDirectCallToHEX2DEC(mixed $expectedResult, bool|float|int|string $value): void
{
$result = ConvertHex::toDecimal($value);
@@ -41,9 +39,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerHEX2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2DEC')]
public function testHEX2DECAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -56,9 +52,7 @@ public function testHEX2DECAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerHEX2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2DEC')]
public function testHEX2DECInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -81,9 +75,7 @@ public static function providerHEX2DEC(): array
return require 'tests/data/Calculation/Engineering/HEX2DEC.php';
}
- /**
- * @dataProvider providerUnhappyHEX2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyHEX2DEC')]
public function testHEX2DECUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -109,9 +101,7 @@ public static function providerUnhappyHEX2DEC(): array
];
}
- /**
- * @dataProvider providerHEX2DECOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2DECOds')]
public function testHEX2DECOds(mixed $expectedResult, bool|float|int|string $value): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -146,9 +136,7 @@ public function testHEX2DECFrac(): void
self::assertSame(ExcelError::NAN(), $this->trimIfQuoted((string) $result), 'Excel');
}
- /**
- * @dataProvider providerHex2DecArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHex2DecArray')]
public function testHex2DecArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2OctTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2OctTest.php
index 603d4b2dc8..ef02a41cbc 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2OctTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Hex2OctTest.php
@@ -27,9 +27,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerHEX2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2OCT')]
public function testDirectCallToHEX2OCT(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
$result = ($digits === null) ? ConvertHex::toOctal($value) : ConvertHex::toOctal($value, $digits);
@@ -41,9 +39,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerHEX2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2OCT')]
public function testHEX2OCTAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -56,9 +52,7 @@ public function testHEX2OCTAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerHEX2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2OCT')]
public function testHEX2OCTInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -81,9 +75,7 @@ public static function providerHEX2OCT(): array
return require 'tests/data/Calculation/Engineering/HEX2OCT.php';
}
- /**
- * @dataProvider providerUnhappyHEX2OCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyHEX2OCT')]
public function testHEX2OCTUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -109,9 +101,7 @@ public static function providerUnhappyHEX2OCT(): array
];
}
- /**
- * @dataProvider providerHEX2OCTOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHEX2OCTOds')]
public function testHEX2OCTOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -146,9 +136,7 @@ public function testHEX2OCTFrac(): void
self::assertSame(ExcelError::NAN(), $this->trimIfQuoted((string) $result), 'Excel');
}
- /**
- * @dataProvider providerHex2OctArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHex2OctArray')]
public function testHex2OctArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImAbsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImAbsTest.php
index 2325a3b135..b1029fa7c8 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImAbsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImAbsTest.php
@@ -15,18 +15,14 @@ class ImAbsTest extends TestCase
{
const COMPLEX_PRECISION = 1E-12;
- /**
- * @dataProvider providerIMABS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMABS')]
public function testDirectCallToIMABS(float|int|string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMABS($arg);
self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);
}
- /**
- * @dataProvider providerIMABS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMABS')]
public function testIMABSAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -38,9 +34,7 @@ public function testIMABSAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);
}
- /**
- * @dataProvider providerIMABS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMABS')]
public function testIMABSInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -63,9 +57,7 @@ public static function providerIMABS(): array
return require 'tests/data/Calculation/Engineering/IMABS.php';
}
- /**
- * @dataProvider providerUnhappyIMABS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMABS')]
public function testIMABSUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -91,9 +83,7 @@ public static function providerUnhappyIMABS(): array
];
}
- /**
- * @dataProvider providerImAbsArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImAbsArray')]
public function testImAbsArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImArgumentTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImArgumentTest.php
index 6b15ddaf91..e701d5a30e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImArgumentTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImArgumentTest.php
@@ -21,18 +21,14 @@ protected function setUp(): void
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
}
- /**
- * @dataProvider providerIMARGUMENT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMARGUMENT')]
public function testDirectCallToIMARGUMENT(float|int|string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMARGUMENT($arg);
self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);
}
- /**
- * @dataProvider providerIMARGUMENT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMARGUMENT')]
public function testIMARGUMENTAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -44,9 +40,7 @@ public function testIMARGUMENTAsFormula(mixed $expectedResult, mixed ...$args):
self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);
}
- /**
- * @dataProvider providerIMARGUMENT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMARGUMENT')]
public function testIMARGUMENTInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -69,9 +63,7 @@ public static function providerIMARGUMENT(): array
return require 'tests/data/Calculation/Engineering/IMARGUMENT.php';
}
- /**
- * @dataProvider providerUnhappyIMARGUMENT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMARGUMENT')]
public function testIMARGUMENTUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImConjugateTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImConjugateTest.php
index 213331eb5d..d3588c7564 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImConjugateTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImConjugateTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMCONJUGATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCONJUGATE')]
public function testDirectCallToIMCONJUGATE(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMCONJUGATE($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMCONJUGATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCONJUGATE')]
public function testIMCONJUGATEAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMCONJUGATEAsFormula(mixed $expectedResult, mixed ...$args):
);
}
- /**
- * @dataProvider providerIMCONJUGATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCONJUGATE')]
public function testIMCONJUGATEInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMCONJUGATE(): array
return require 'tests/data/Calculation/Engineering/IMCONJUGATE.php';
}
- /**
- * @dataProvider providerUnhappyIMCONJUGATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMCONJUGATE')]
public function testIMCONJUGATEUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMCONJUGATE(): array
];
}
- /**
- * @dataProvider providerImConjugateArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImConjugateArray')]
public function testImConjugateArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCosTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCosTest.php
index ef7332f322..77b2e61db7 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCosTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCosTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMCOS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCOS')]
public function testDirectCallToIMCOS(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMCOS($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMCOS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCOS')]
public function testIMCOSAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMCOSAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMCOS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCOS')]
public function testIMCOSInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMCOS(): array
return require 'tests/data/Calculation/Engineering/IMCOS.php';
}
- /**
- * @dataProvider providerUnhappyIMCOS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMCOS')]
public function testIMCOSUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMCOS(): array
];
}
- /**
- * @dataProvider providerImCosArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImCosArray')]
public function testImCosArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCoshTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCoshTest.php
index a972e7d1f9..be3532ccef 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCoshTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCoshTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMCOSH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCOSH')]
public function testDirectCallToIMCOSH(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMCOSH($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMCOSH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCOSH')]
public function testIMCOSHAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMCOSHAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMCOSH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCOSH')]
public function testIMCOSHInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMCOSH(): array
return require 'tests/data/Calculation/Engineering/IMCOSH.php';
}
- /**
- * @dataProvider providerUnhappyIMCOSH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMCOSH')]
public function testIMCOSHUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMCOSH(): array
];
}
- /**
- * @dataProvider providerImCoshArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImCoshArray')]
public function testImCoshArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCotTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCotTest.php
index 97f88b604a..3cba95456f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCotTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCotTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMCOT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCOT')]
public function testDirectCallToIMCOT(float|string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMCOT($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMCOT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCOT')]
public function testIMCOTAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMCOTAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMCOT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCOT')]
public function testIMCOTInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMCOT(): array
return require 'tests/data/Calculation/Engineering/IMCOT.php';
}
- /**
- * @dataProvider providerUnhappyIMCOT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMCOT')]
public function testIMCOTUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMCOT(): array
];
}
- /**
- * @dataProvider providerImCotArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImCotArray')]
public function testImCotArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCscTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCscTest.php
index d694bc9d77..83cc422dc3 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCscTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCscTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMCSC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCSC')]
public function testDirectCallToIMCSC(float|string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMCSC($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMCSC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCSC')]
public function testIMCSCAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMCSCAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMCSC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCSC')]
public function testIMCSCInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMCSC(): array
return require 'tests/data/Calculation/Engineering/IMCSC.php';
}
- /**
- * @dataProvider providerUnhappyIMCSC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMCSC')]
public function testIMCSCUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMCSC(): array
];
}
- /**
- * @dataProvider providerImCscArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImCscArray')]
public function testImCscArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCschTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCschTest.php
index cf1a888172..834fa2a0f0 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCschTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImCschTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMCSCH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCSCH')]
public function testDirectCallToIMCSCH(float|string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMCSCH($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMCSCH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCSCH')]
public function testIMCSCHAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMCSCHAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMCSCH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMCSCH')]
public function testIMCSCHInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMCSCH(): array
return require 'tests/data/Calculation/Engineering/IMCSCH.php';
}
- /**
- * @dataProvider providerUnhappyIMCSCH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMCSCH')]
public function testIMCSCHUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMCSCH(): array
];
}
- /**
- * @dataProvider providerImCschArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImCschArray')]
public function testImCschArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImDivTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImDivTest.php
index 9c73efa811..5c709752bf 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImDivTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImDivTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMDIV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMDIV')]
public function testDirectCallToIMDIV(string $expectedResult, string $dividend, string $divisor): void
{
$result = ComplexOperations::IMDIV($dividend, $divisor);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMDIV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMDIV')]
public function testIMDIVAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMDIVAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMDIV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMDIV')]
public function testIMDIVInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMDIV(): array
return require 'tests/data/Calculation/Engineering/IMDIV.php';
}
- /**
- * @dataProvider providerUnhappyIMDIV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMDIV')]
public function testIMDIVUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -117,9 +109,7 @@ public static function providerUnhappyIMDIV(): array
];
}
- /**
- * @dataProvider providerImDivArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImDivArray')]
public function testImDivArray(array $expectedResult, string $dividend, string $divisor): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImExpTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImExpTest.php
index 23541b2cc7..c9b480fb8b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImExpTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImExpTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMEXP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMEXP')]
public function testDirectCallToIMEXP(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMEXP($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMEXP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMEXP')]
public function testIMEXPAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMEXPAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMEXP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMEXP')]
public function testIMEXPInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMEXP(): array
return require 'tests/data/Calculation/Engineering/IMEXP.php';
}
- /**
- * @dataProvider providerUnhappyIMEXP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMEXP')]
public function testIMEXPUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMEXP(): array
];
}
- /**
- * @dataProvider providerImExpArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImExpArray')]
public function testImExpArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLnTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLnTest.php
index 655ae31c5f..0e0c5a558c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLnTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLnTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMLN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMLN')]
public function testDirectCallToIMLN(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMLN($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMLN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMLN')]
public function testIMLNAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMLNAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMLN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMLN')]
public function testIMLNInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMLN(): array
return require 'tests/data/Calculation/Engineering/IMLN.php';
}
- /**
- * @dataProvider providerUnhappyIMLN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMLN')]
public function testIMLNUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMLN(): array
];
}
- /**
- * @dataProvider providerImLnArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImLnArray')]
public function testImLnArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLog10Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLog10Test.php
index c7940c6006..08d5a7ffae 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLog10Test.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLog10Test.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMLOG10
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMLOG10')]
public function testDirectCallToIMLOG10(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMLOG10($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMLOG10
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMLOG10')]
public function testIMLOG10AsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMLOG10AsFormula(mixed $expectedResult, mixed ...$args): voi
);
}
- /**
- * @dataProvider providerIMLOG10
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMLOG10')]
public function testIMLOG10InWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMLOG10(): array
return require 'tests/data/Calculation/Engineering/IMLOG10.php';
}
- /**
- * @dataProvider providerUnhappyIMLOG10
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMLOG10')]
public function testIMLOG10UnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMLOG10(): array
];
}
- /**
- * @dataProvider providerImLog10Array
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImLog10Array')]
public function testImLog10Array(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLog2Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLog2Test.php
index 42ab29cf60..02e6cdbedf 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLog2Test.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImLog2Test.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMLOG2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMLOG2')]
public function testDirectCallToIMLOG2(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMLOG2($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMLOG2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMLOG2')]
public function testIMLOG2AsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMLOG2AsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMLOG2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMLOG2')]
public function testIMLOG2InWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMLOG2(): array
return require 'tests/data/Calculation/Engineering/IMLOG2.php';
}
- /**
- * @dataProvider providerUnhappyIMLOG2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMLOG2')]
public function testIMLOG2UnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMLOG2(): array
];
}
- /**
- * @dataProvider providerImLog2Array
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImLog2Array')]
public function testImLog2Array(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImPowerTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImPowerTest.php
index 4a33ba6a32..edb3a1724a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImPowerTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImPowerTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMPOWER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMPOWER')]
public function testDirectCallToIMPOWER(float|int|string $expectedResult, string $arg1, float|int|string $arg2): void
{
$result = ComplexFunctions::IMPOWER($arg1, $arg2);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMPOWER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMPOWER')]
public function testIMPOWERAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMPOWERAsFormula(mixed $expectedResult, mixed ...$args): voi
);
}
- /**
- * @dataProvider providerIMPOWER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMPOWER')]
public function testIMPOWERInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMPOWER(): array
return require 'tests/data/Calculation/Engineering/IMPOWER.php';
}
- /**
- * @dataProvider providerUnhappyIMPOWER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMPOWER')]
public function testIMPOWERUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMPOWER(): array
];
}
- /**
- * @dataProvider providerImPowerArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImPowerArray')]
public function testImPowerArray(array $expectedResult, string $complex, string $real): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImProductTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImProductTest.php
index 256498b71b..fb7fc7f8df 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImProductTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImProductTest.php
@@ -26,10 +26,9 @@ protected function setUp(): void
}
/**
- * @dataProvider providerIMPRODUCT
- *
* @param string ...$args variadic arguments
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMPRODUCT')]
public function testDirectCallToIMPRODUCT(mixed $expectedResult, ...$args): void
{
$result = ComplexOperations::IMPRODUCT(...$args);
@@ -44,9 +43,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMPRODUCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMPRODUCT')]
public function testIMPRODUCTAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -62,9 +59,7 @@ public function testIMPRODUCTAsFormula(mixed $expectedResult, mixed ...$args): v
);
}
- /**
- * @dataProvider providerIMPRODUCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMPRODUCT')]
public function testIMPRODUCTInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -90,9 +85,7 @@ public static function providerIMPRODUCT(): array
return require 'tests/data/Calculation/Engineering/IMPRODUCT.php';
}
- /**
- * @dataProvider providerUnhappyIMPRODUCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMPRODUCT')]
public function testIMPRODUCTUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImRealTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImRealTest.php
index 4cbc4a7836..57ef95390e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImRealTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImRealTest.php
@@ -21,18 +21,14 @@ protected function setUp(): void
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
}
- /**
- * @dataProvider providerIMREAL
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMREAL')]
public function testDirectCallToIMREAL(float|int|string $expectedResult, float|int|string $arg): void
{
$result = Complex::IMREAL((string) $arg);
self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);
}
- /**
- * @dataProvider providerIMREAL
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMREAL')]
public function testIMREALAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -44,9 +40,7 @@ public function testIMREALAsFormula(mixed $expectedResult, mixed ...$args): void
self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);
}
- /**
- * @dataProvider providerIMREAL
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMREAL')]
public function testIMREALInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -69,9 +63,7 @@ public static function providerIMREAL(): array
return require 'tests/data/Calculation/Engineering/IMREAL.php';
}
- /**
- * @dataProvider providerUnhappyIMREAL
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMREAL')]
public function testIMREALUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -97,9 +89,7 @@ public static function providerUnhappyIMREAL(): array
];
}
- /**
- * @dataProvider providerImRealArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImRealArray')]
public function testImRealArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSecTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSecTest.php
index 583b08494a..d37552ab7c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSecTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSecTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMSEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSEC')]
public function testDirectCallToIMSEC(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMSEC($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMSEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSEC')]
public function testIMSECAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMSECAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMSEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSEC')]
public function testIMSECInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMSEC(): array
return require 'tests/data/Calculation/Engineering/IMSEC.php';
}
- /**
- * @dataProvider providerUnhappyIMSEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMSEC')]
public function testIMSECUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMSEC(): array
];
}
- /**
- * @dataProvider providerImSecArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImSecArray')]
public function testImSecArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSechTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSechTest.php
index c1840a4274..8083880584 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSechTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSechTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMSECH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSECH')]
public function testDirectCallToIMSECH(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMSECH($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMSECH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSECH')]
public function testIMSECHAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMSECHAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMSECH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSECH')]
public function testIMSECHInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMSECH(): array
return require 'tests/data/Calculation/Engineering/IMSECH.php';
}
- /**
- * @dataProvider providerUnhappyIMSECH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMSECH')]
public function testIMSECHUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMSECH(): array
];
}
- /**
- * @dataProvider providerImSecHArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImSecHArray')]
public function testImSecHArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSinTest.php
index 347d522e19..e413da1e8a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSinTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSinTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMSIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSIN')]
public function testDirectCallToIMSIN(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMSIN($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMSIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSIN')]
public function testIMSINAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMSINAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMSIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSIN')]
public function testIMSINInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMSIN(): array
return require 'tests/data/Calculation/Engineering/IMSIN.php';
}
- /**
- * @dataProvider providerUnhappyIMSIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMSIN')]
public function testIMSINUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMSIN(): array
];
}
- /**
- * @dataProvider providerImSinArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImSinArray')]
public function testImSinArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSinhTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSinhTest.php
index 4198033fa3..99b6b6245c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSinhTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSinhTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMSINH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSINH')]
public function testDirectCallToIMSINH(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMSINH($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMSINH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSINH')]
public function testIMSINHAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMSINHAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMSINH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSINH')]
public function testIMSINHInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMSINH(): array
return require 'tests/data/Calculation/Engineering/IMSINH.php';
}
- /**
- * @dataProvider providerUnhappyIMSINH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMSINH')]
public function testIMSINHUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMSINH(): array
];
}
- /**
- * @dataProvider providerImSinHArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImSinHArray')]
public function testImSinHArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSqrtTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSqrtTest.php
index 7edf1e0322..08ee4b78b1 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSqrtTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSqrtTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMSQRT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSQRT')]
public function testDirectCallToIMSQRT(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMSQRT($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMSQRT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSQRT')]
public function testIMSQRTAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMSQRTAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMSQRT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSQRT')]
public function testIMSQRTInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMSQRT(): array
return require 'tests/data/Calculation/Engineering/IMSQRT.php';
}
- /**
- * @dataProvider providerUnhappyIMSQRT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMSQRT')]
public function testIMSQRTUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMSQRT(): array
];
}
- /**
- * @dataProvider providerImSqrtArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImSqrtArray')]
public function testImSqrtArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSubTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSubTest.php
index ff95604ed7..cfcd5d3bd7 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSubTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSubTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMSUB
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSUB')]
public function testDirectCallToIMSUB(string $expectedResult, string $arg1, string $arg2): void
{
$result = ComplexOperations::IMSUB($arg1, $arg2);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMSUB
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSUB')]
public function testIMSUBAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMSUBAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMSUB
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSUB')]
public function testIMSUBInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMSUB(): array
return require 'tests/data/Calculation/Engineering/IMSUB.php';
}
- /**
- * @dataProvider providerUnhappyIMSUB
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMSUB')]
public function testIMSUBUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -117,9 +109,7 @@ public static function providerUnhappyIMSUB(): array
];
}
- /**
- * @dataProvider providerImSubArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImSubArray')]
public function testImSubArray(array $expectedResult, string $subidend, string $subisor): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSumTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSumTest.php
index 625348de66..dbf6a7463c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSumTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImSumTest.php
@@ -26,10 +26,9 @@ protected function setUp(): void
}
/**
- * @dataProvider providerIMSUM
- *
* @param string ...$args variadic arguments
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSUM')]
public function testDirectCallToIMSUM(mixed $expectedResult, ...$args): void
{
$result = ComplexOperations::IMSUM(...$args);
@@ -44,9 +43,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMSUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSUM')]
public function testIMSUMAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -62,9 +59,7 @@ public function testIMSUMAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMSUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMSUM')]
public function testIMSUMInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -90,9 +85,7 @@ public static function providerIMSUM(): array
return require 'tests/data/Calculation/Engineering/IMSUM.php';
}
- /**
- * @dataProvider providerUnhappyIMSUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMSUM')]
public function testIMSUMUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImTanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImTanTest.php
index 949e42a640..b4d5af1b80 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImTanTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImTanTest.php
@@ -25,9 +25,7 @@ protected function setUp(): void
$this->complexAssert = new ComplexAssert();
}
- /**
- * @dataProvider providerIMTAN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMTAN')]
public function testDirectCallToIMTAN(string $expectedResult, string $arg): void
{
$result = ComplexFunctions::IMTAN($arg);
@@ -42,9 +40,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerIMTAN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMTAN')]
public function testIMTANAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -60,9 +56,7 @@ public function testIMTANAsFormula(mixed $expectedResult, mixed ...$args): void
);
}
- /**
- * @dataProvider providerIMTAN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMTAN')]
public function testIMTANInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -88,9 +82,7 @@ public static function providerIMTAN(): array
return require 'tests/data/Calculation/Engineering/IMTAN.php';
}
- /**
- * @dataProvider providerUnhappyIMTAN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMTAN')]
public function testIMTANUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -116,9 +108,7 @@ public static function providerUnhappyIMTAN(): array
];
}
- /**
- * @dataProvider providerImTanArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImTanArray')]
public function testImTanArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImaginaryTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImaginaryTest.php
index f62cc1d893..4f1f7b85e0 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImaginaryTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/ImaginaryTest.php
@@ -21,18 +21,14 @@ protected function setUp(): void
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
}
- /**
- * @dataProvider providerIMAGINARY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMAGINARY')]
public function testDirectCallToIMAGINARY(float|int|string $expectedResult, float|int|string $arg): void
{
$result = Complex::IMAGINARY((string) $arg);
self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);
}
- /**
- * @dataProvider providerIMAGINARY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMAGINARY')]
public function testIMAGINARYAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -44,9 +40,7 @@ public function testIMAGINARYAsFormula(mixed $expectedResult, mixed ...$args): v
self::assertEqualsWithDelta($expectedResult, $result, self::COMPLEX_PRECISION);
}
- /**
- * @dataProvider providerIMAGINARY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIMAGINARY')]
public function testIMAGINARYInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -69,9 +63,7 @@ public static function providerIMAGINARY(): array
return require 'tests/data/Calculation/Engineering/IMAGINARY.php';
}
- /**
- * @dataProvider providerUnhappyIMAGINARY
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyIMAGINARY')]
public function testIMAGINARYUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -97,9 +89,7 @@ public static function providerUnhappyIMAGINARY(): array
];
}
- /**
- * @dataProvider providerImaginaryArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerImaginaryArray')]
public function testImaginaryArray(array $expectedResult, string $complex): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2BinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2BinTest.php
index 9e02a442f7..be2aeaeafe 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2BinTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2BinTest.php
@@ -27,9 +27,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerOCT2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2BIN')]
public function testDirectCallToOCT2BIN(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
$result = ($digits === null) ? ConvertOctal::toBinary($value) : ConvertOctal::toBinary($value, $digits);
@@ -41,9 +39,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerOCT2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2BIN')]
public function testOCT2BINAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -56,9 +52,7 @@ public function testOCT2BINAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerOCT2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2BIN')]
public function testOCT2BINInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -81,9 +75,7 @@ public static function providerOCT2BIN(): array
return require 'tests/data/Calculation/Engineering/OCT2BIN.php';
}
- /**
- * @dataProvider providerUnhappyOCT2BIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyOCT2BIN')]
public function testOCT2BINUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -109,9 +101,7 @@ public static function providerUnhappyOCT2BIN(): array
];
}
- /**
- * @dataProvider providerOCT2BINOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2BINOds')]
public function testOCT2BINOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -146,9 +136,7 @@ public function testOCT2BINFrac(): void
self::assertSame(ExcelError::NAN(), $this->trimIfQuoted((string) $result), 'Excel');
}
- /**
- * @dataProvider providerOct2BinArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOct2BinArray')]
public function testOct2BinArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2DecTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2DecTest.php
index 45a868e6ab..911aac805f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2DecTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2DecTest.php
@@ -27,9 +27,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerOCT2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2DEC')]
public function testDirectCallToOCT2DEC(mixed $expectedResult, bool|string $value): void
{
$result = ConvertOctal::toDecimal($value);
@@ -41,9 +39,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerOCT2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2DEC')]
public function testOCT2DECAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -56,9 +52,7 @@ public function testOCT2DECAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerOCT2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2DEC')]
public function testOCT2DECInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -81,9 +75,7 @@ public static function providerOCT2DEC(): array
return require 'tests/data/Calculation/Engineering/OCT2DEC.php';
}
- /**
- * @dataProvider providerUnhappyOCT2DEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyOCT2DEC')]
public function testOCT2DECUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -109,9 +101,7 @@ public static function providerUnhappyOCT2DEC(): array
];
}
- /**
- * @dataProvider providerOCT2DECOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2DECOds')]
public function testOCT2DECOds(mixed $expectedResult, bool|string $value): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -146,9 +136,7 @@ public function testOCT2DECFrac(): void
self::assertSame(ExcelError::NAN(), $this->trimIfQuoted((string) $result), 'Excel');
}
- /**
- * @dataProvider providerOct2DecArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOct2DecArray')]
public function testOct2DecArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2HexTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2HexTest.php
index a350bd7593..94da193a26 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2HexTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Engineering/Oct2HexTest.php
@@ -27,9 +27,7 @@ protected function tearDown(): void
Functions::setCompatibilityMode($this->compatibilityMode);
}
- /**
- * @dataProvider providerOCT2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2HEX')]
public function testDirectCallToOCT2HEX(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
$result = ($digits === null) ? ConvertOctal::toHex($value) : ConvertOctal::toHex($value, $digits);
@@ -41,9 +39,7 @@ private function trimIfQuoted(string $value): string
return trim($value, '"');
}
- /**
- * @dataProvider providerOCT2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2HEX')]
public function testOCT2HEXAsFormula(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -56,9 +52,7 @@ public function testOCT2HEXAsFormula(mixed $expectedResult, mixed ...$args): voi
self::assertSame($expectedResult, $this->trimIfQuoted((string) $result));
}
- /**
- * @dataProvider providerOCT2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2HEX')]
public function testOCT2HEXInWorksheet(mixed $expectedResult, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -81,9 +75,7 @@ public static function providerOCT2HEX(): array
return require 'tests/data/Calculation/Engineering/OCT2HEX.php';
}
- /**
- * @dataProvider providerUnhappyOCT2HEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUnhappyOCT2HEX')]
public function testOCT2HEXUnhappyPath(string $expectedException, mixed ...$args): void
{
$arguments = new FormulaArguments(...$args);
@@ -109,9 +101,7 @@ public static function providerUnhappyOCT2HEX(): array
];
}
- /**
- * @dataProvider providerOCT2HEXOds
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOCT2HEXOds')]
public function testOCT2HEXOds(mixed $expectedResult, bool|float|int|string $value, ?int $digits = null): void
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
@@ -146,9 +136,7 @@ public function testOCT2HEXFrac(): void
self::assertSame(ExcelError::NAN(), $this->trimIfQuoted((string) $result), 'Excel');
}
- /**
- * @dataProvider providerOct2HexArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOct2HexArray')]
public function testOct2HexArray(array $expectedResult, string $value): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintMTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintMTest.php
index 07f99cc2db..9889693ada 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintMTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintMTest.php
@@ -6,9 +6,7 @@
class AccrintMTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerACCRINTM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerACCRINTM')]
public function testACCRINTM(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('ACCRINTM', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintTest.php
index 97bd742df1..98bc0654fb 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AccrintTest.php
@@ -6,9 +6,7 @@
class AccrintTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerACCRINT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerACCRINT')]
public function testACCRINT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('ACCRINT', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorDegRcTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorDegRcTest.php
index 459b7674ac..77153d3965 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorDegRcTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorDegRcTest.php
@@ -6,9 +6,7 @@
class AmorDegRcTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAMORDEGRC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAMORDEGRC')]
public function testAMORDEGRC(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('AMORDEGRC', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorLincTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorLincTest.php
index 95db9bc190..a963c38d8b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorLincTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AmorLincTest.php
@@ -6,9 +6,7 @@
class AmorLincTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAMORLINC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAMORLINC')]
public function testAMORLINC(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('AMORLINC', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDayBsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDayBsTest.php
index 15633fd8e0..3907f268ae 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDayBsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDayBsTest.php
@@ -6,9 +6,7 @@
class CoupDayBsTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOUPDAYBS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOUPDAYBS')]
public function testCOUPDAYBS(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('COUPDAYBS', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysNcTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysNcTest.php
index 7696f61f85..848f763dee 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysNcTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysNcTest.php
@@ -6,9 +6,7 @@
class CoupDaysNcTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOUPDAYSNC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOUPDAYSNC')]
public function testCOUPDAYSNC(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('COUPDAYSNC', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysTest.php
index f7ba0e7be0..6d5fe6d650 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupDaysTest.php
@@ -6,9 +6,7 @@
class CoupDaysTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOUPDAYS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOUPDAYS')]
public function testCOUPDAYS(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('COUPDAYS', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNcdTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNcdTest.php
index f3f04792f0..fd88e6a3ad 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNcdTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNcdTest.php
@@ -6,9 +6,7 @@
class CoupNcdTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOUPNCD
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOUPNCD')]
public function testCOUPNCD(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('COUPNCD', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNumTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNumTest.php
index 86360ecb33..792ccad443 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNumTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupNumTest.php
@@ -6,9 +6,7 @@
class CoupNumTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOUPNUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOUPNUM')]
public function testCOUPNUM(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('COUPNUM', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupPcdTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupPcdTest.php
index 8c02ea048c..5566e6b73e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupPcdTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CoupPcdTest.php
@@ -6,9 +6,7 @@
class CoupPcdTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOUPPCD
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOUPPCD')]
public function testCOUPPCD(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('COUPPCD', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumIpmtTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumIpmtTest.php
index a27724ab8b..7260f1b553 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumIpmtTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumIpmtTest.php
@@ -6,9 +6,7 @@
class CumIpmtTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCUMIPMT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCUMIPMT')]
public function testCUMIPMT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('CUMIPMT', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumPrincTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumPrincTest.php
index b241c29406..80059ca190 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumPrincTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/CumPrincTest.php
@@ -6,9 +6,7 @@
class CumPrincTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCUMPRINC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCUMPRINC')]
public function testCUMPRINC(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('CUMPRINC', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DbTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DbTest.php
index 13856c048b..6a39933ad8 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DbTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DbTest.php
@@ -6,9 +6,7 @@
class DbTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerDB
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDB')]
public function testDB(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('DB', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DdbTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DdbTest.php
index 5e513ed646..fce33e5c6b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DdbTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DdbTest.php
@@ -6,9 +6,7 @@
class DdbTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerDDB
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDDB')]
public function testDDB(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('DDB', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DiscTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DiscTest.php
index 317854edc1..48ce7159d9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DiscTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DiscTest.php
@@ -6,9 +6,7 @@
class DiscTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerDISC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDISC')]
public function testDISC(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('DISC', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarDeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarDeTest.php
index c379377401..cd8b091d81 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarDeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarDeTest.php
@@ -8,9 +8,7 @@
class DollarDeTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerDOLLARDE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDOLLARDE')]
public function testDOLLARDE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('DOLLARDE', $expectedResult, $args);
@@ -21,9 +19,7 @@ public static function providerDOLLARDE(): array
return require 'tests/data/Calculation/Financial/DOLLARDE.php';
}
- /**
- * @dataProvider providerDollarDeArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDollarDeArray')]
public function testDollarDeArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarFrTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarFrTest.php
index 992b5a64eb..c305ab9e8c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarFrTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/DollarFrTest.php
@@ -6,9 +6,7 @@
class DollarFrTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerDOLLARFR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDOLLARFR')]
public function testDOLLARFR(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('DOLLARFR', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/EffectTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/EffectTest.php
index 4811c64c3c..049e3de5e3 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/EffectTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/EffectTest.php
@@ -6,9 +6,7 @@
class EffectTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerEFFECT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEFFECT')]
public function testEFFECT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('EFFECT', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/FvScheduleTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/FvScheduleTest.php
index bb72492f52..bc2c8b7a0d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/FvScheduleTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/FvScheduleTest.php
@@ -6,9 +6,7 @@
class FvScheduleTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFVSCHEDULE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFVSCHEDULE')]
public function testFVSCHEDULE(mixed $expectedResult, mixed $principal = null, ?array $schedule = null): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/FvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/FvTest.php
index 1dbfee1af2..df0c5db07f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/FvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/FvTest.php
@@ -6,9 +6,7 @@
class FvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFV')]
public function testFV(mixed $expectedResult, array $args): void
{
$this->runTestCase('FV', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/HelpersTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/HelpersTest.php
index 1d5087034e..4ccf358ddd 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/HelpersTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/HelpersTest.php
@@ -9,9 +9,7 @@
class HelpersTest extends TestCase
{
- /**
- * @dataProvider providerDaysPerYear
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDaysPerYear')]
public function testDaysPerYear(mixed $expectedResult, int $year, int|string $basis): void
{
$result = Helpers::daysPerYear($year, $basis);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IPmtTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IPmtTest.php
index 75faf79272..46d6112251 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IPmtTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IPmtTest.php
@@ -6,9 +6,7 @@
class IPmtTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerIPMT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIPMT')]
public function testIPMT(mixed $expectedResult, array $args): void
{
$this->runTestCase('IPMT', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IntRateTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IntRateTest.php
index fc111f1cd7..307f95f222 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IntRateTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IntRateTest.php
@@ -6,9 +6,7 @@
class IntRateTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerINTRATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerINTRATE')]
public function testINTRATE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('INTRATE', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IrrTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IrrTest.php
index 08d09c5875..ade1cbe46c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IrrTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IrrTest.php
@@ -6,9 +6,7 @@
class IrrTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerIRR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIRR')]
public function testIRR(mixed $expectedResult, mixed $values = null): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IsPmtTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IsPmtTest.php
index ea085fb50c..2c460a1a08 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IsPmtTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/IsPmtTest.php
@@ -6,9 +6,7 @@
class IsPmtTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerISPMT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerISPMT')]
public function testISPMT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('ISPMT', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/MirrTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/MirrTest.php
index d2a65dd068..ebdf0ac1b5 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/MirrTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/MirrTest.php
@@ -8,9 +8,7 @@
class MirrTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMIRR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMIRR')]
public function testMIRR(mixed $expectedResult, mixed $values, mixed $financeRate = null, mixed $reinvestRate = null): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NPerTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NPerTest.php
index 302ad808fb..8d36412b77 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NPerTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NPerTest.php
@@ -6,9 +6,7 @@
class NPerTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerNPER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNPER')]
public function testNPER(mixed $expectedResult, array $args): void
{
$this->runTestCase('NPER', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NominalTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NominalTest.php
index 302d5a0c17..df805207b2 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NominalTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NominalTest.php
@@ -6,9 +6,7 @@
class NominalTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerNOMINAL
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNOMINAL')]
public function testNOMINAL(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('NOMINAL', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NpvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NpvTest.php
index c43d819bdc..77e1efcb67 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NpvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/NpvTest.php
@@ -6,9 +6,7 @@
class NpvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerNPV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNPV')]
public function testNPV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('NPV', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PDurationTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PDurationTest.php
index 7c31158e14..d4cc3095c9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PDurationTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PDurationTest.php
@@ -6,9 +6,7 @@
class PDurationTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPDURATION
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPDURATION')]
public function testPDURATION(mixed $expectedResult, array $args): void
{
$this->runTestCase('PDURATION', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PmtTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PmtTest.php
index ae3f6ea9fe..c8adfb83a5 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PmtTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PmtTest.php
@@ -6,9 +6,7 @@
class PmtTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPMT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPMT')]
public function testPMT(mixed $expectedResult, array $args): void
{
$this->runTestCase('PMT', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PpmtTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PpmtTest.php
index 820d315d8c..dc3d795f68 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PpmtTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PpmtTest.php
@@ -6,9 +6,7 @@
class PpmtTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPPMT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPPMT')]
public function testPPMT(mixed $expectedResult, array $args): void
{
$this->runTestCase('PPMT', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceDiscTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceDiscTest.php
index 2abb6effbc..065299bdb0 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceDiscTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceDiscTest.php
@@ -6,9 +6,7 @@
class PriceDiscTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPRICEDISC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPRICEDISC')]
public function testPRICEDISC(mixed $expectedResult, array $args): void
{
$this->runTestCase('PRICEDISC', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceMatTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceMatTest.php
index a30c196b83..b275fc4bf8 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceMatTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceMatTest.php
@@ -6,9 +6,7 @@
class PriceMatTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPRICEMAT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPRICEMAT')]
public function testPRICEMAT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('PRICEMAT', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceTest.php
index 56328f882a..cb22ff8ca3 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PriceTest.php
@@ -6,9 +6,7 @@
class PriceTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPRICE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPRICE')]
public function testPRICE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('PRICE', $expectedResult, $args);
@@ -19,9 +17,7 @@ public static function providerPRICE(): array
return require 'tests/data/Calculation/Financial/PRICE.php';
}
- /**
- * @dataProvider providerPRICE3
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPRICE3')]
public function testPRICE3(mixed $expectedResult, mixed ...$args): void
{
// These results (PRICE function with basis codes 2 and 3)
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PvTest.php
index ffdb1e25b4..d095d311b0 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/PvTest.php
@@ -6,9 +6,7 @@
class PvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPV')]
public function testPV(mixed $expectedResult, array $args): void
{
$this->runTestCase('PV', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/RateTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/RateTest.php
index f36437395e..02914cdf5e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/RateTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/RateTest.php
@@ -6,9 +6,7 @@
class RateTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerRATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRATE')]
public function testRATE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('RATE', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/ReceivedTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/ReceivedTest.php
index d5ac3000b2..fd13f6a724 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/ReceivedTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/ReceivedTest.php
@@ -6,9 +6,7 @@
class ReceivedTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerRECEIVED
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRECEIVED')]
public function testRECEIVED(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('RECEIVED', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/RriTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/RriTest.php
index ccfd7587b3..ea08d37720 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/RriTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/RriTest.php
@@ -6,9 +6,7 @@
class RriTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerRRI
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRRI')]
public function testRRI(mixed $expectedResult, array $args): void
{
$this->runTestCase('RRI', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/SlnTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/SlnTest.php
index abe5a7a9cf..3e67a673c6 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/SlnTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/SlnTest.php
@@ -6,9 +6,7 @@
class SlnTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSLN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSLN')]
public function testSLN(mixed $expectedResult, array $args): void
{
$this->runTestCase('SLN', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/SydTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/SydTest.php
index 6b8561771c..6a2534dbf6 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/SydTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/SydTest.php
@@ -6,9 +6,7 @@
class SydTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSYD
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSYD')]
public function testSYD(mixed $expectedResult, array $args): void
{
$this->runTestCase('SYD', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillEqTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillEqTest.php
index d18aa52852..e67358d1e4 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillEqTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillEqTest.php
@@ -6,9 +6,7 @@
class TBillEqTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTBILLEQ
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTBILLEQ')]
public function testTBILLEQ(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('TBILLEQ', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillPriceTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillPriceTest.php
index c8778fc28b..62ca8f1f8d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillPriceTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillPriceTest.php
@@ -6,9 +6,7 @@
class TBillPriceTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTBILLPRICE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTBILLPRICE')]
public function testTBILLPRICE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('TBILLPRICE', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillYieldTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillYieldTest.php
index 30d58c3277..807d22f9d6 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillYieldTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/TBillYieldTest.php
@@ -6,9 +6,7 @@
class TBillYieldTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTBILLYIELD
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTBILLYIELD')]
public function testTBILLYIELD(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('TBILLYIELD', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/UsDollarTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/UsDollarTest.php
index 91714a169e..3bb4af0432 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/UsDollarTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/UsDollarTest.php
@@ -6,9 +6,7 @@
class UsDollarTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerUSDOLLAR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUSDOLLAR')]
public function testUSDOLLAR(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('USDOLLAR', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/XNpvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/XNpvTest.php
index a94a9210d3..65c2fce18b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/XNpvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/XNpvTest.php
@@ -6,9 +6,7 @@
class XNpvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerXNPV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerXNPV')]
public function testXNPV(mixed $expectedResult, mixed $rate = null, mixed $values = null, mixed $dates = null): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/XirrTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/XirrTest.php
index d48bd1b610..76275e8f9c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/XirrTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/XirrTest.php
@@ -6,9 +6,7 @@
class XirrTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerXIRR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerXIRR')]
public function testXIRR(mixed $expectedResult, mixed $values = null, mixed $dates = null, mixed $guess = null): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/YieldDiscTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/YieldDiscTest.php
index 32f8431747..cb5c25ca50 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/YieldDiscTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/YieldDiscTest.php
@@ -6,9 +6,7 @@
class YieldDiscTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerYIELDDISC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerYIELDDISC')]
public function testYIELDDISC(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('YIELDDISC', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/YieldMatTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/YieldMatTest.php
index 28c5540607..73c799cbc0 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/YieldMatTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/YieldMatTest.php
@@ -6,9 +6,7 @@
class YieldMatTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerYIELDMAT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerYIELDMAT')]
public function testYIELDMAT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('YIELDMAT', $expectedResult, $args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/ErrorTypeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/ErrorTypeTest.php
index c0e9eb4d02..eae76a1a6a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/ErrorTypeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/ErrorTypeTest.php
@@ -16,9 +16,7 @@ public function testErrorTypeNoArgument(): void
self::assertSame(ExcelError::NA(), $result);
}
- /**
- * @dataProvider providerErrorType
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerErrorType')]
public function testErrorType(int|string $expectedResult, mixed $value): void
{
$result = ExcelError::type($value);
@@ -30,9 +28,7 @@ public static function providerErrorType(): array
return require 'tests/data/Calculation/Information/ERROR_TYPE.php';
}
- /**
- * @dataProvider providerErrorTypeArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerErrorTypeArray')]
public function testErrorTypeArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsBlankTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsBlankTest.php
index 8a047a59e3..495798fd64 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsBlankTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsBlankTest.php
@@ -16,9 +16,7 @@ public function testIsBlankNoArgument(): void
self::assertTrue($result);
}
- /**
- * @dataProvider providerIsBlank
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsBlank')]
public function testIsBlank(bool $expectedResult, mixed $value): void
{
$result = Value::isBlank($value);
@@ -30,9 +28,7 @@ public static function providerIsBlank(): array
return require 'tests/data/Calculation/Information/IS_BLANK.php';
}
- /**
- * @dataProvider providerIsBlankArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsBlankArray')]
public function testIsBlankArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrTest.php
index a24dde86f0..5b93149fbc 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrTest.php
@@ -16,9 +16,7 @@ public function testIsErrNoArgument(): void
self::assertFalse($result);
}
- /**
- * @dataProvider providerIsErr
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsErr')]
public function testIsErr(bool $expectedResult, mixed $value): void
{
$result = ErrorValue::isErr($value);
@@ -30,9 +28,7 @@ public static function providerIsErr(): array
return require 'tests/data/Calculation/Information/IS_ERR.php';
}
- /**
- * @dataProvider providerIsErrArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsErrArray')]
public function testIsErrArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrorTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrorTest.php
index 765cb8e558..526a379cb4 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrorTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsErrorTest.php
@@ -16,9 +16,7 @@ public function testIsErrorNoArgument(): void
self::assertFalse($result);
}
- /**
- * @dataProvider providerIsError
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsError')]
public function testIsError(bool $expectedResult, mixed $value): void
{
$result = ErrorValue::isError($value);
@@ -30,9 +28,7 @@ public static function providerIsError(): array
return require 'tests/data/Calculation/Information/IS_ERROR.php';
}
- /**
- * @dataProvider providerIsErrorArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsErrorArray')]
public function testIsErrorArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsEvenTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsEvenTest.php
index 0ebf0ed059..c8293d6df9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsEvenTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsEvenTest.php
@@ -17,9 +17,7 @@ public function testIsEvenNoArgument(): void
self::assertSame(ExcelError::NAME(), $result);
}
- /**
- * @dataProvider providerIsEven
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsEven')]
public function testIsEven(bool|string $expectedResult, mixed $value): void
{
$result = Value::isEven($value);
@@ -31,9 +29,7 @@ public static function providerIsEven(): array
return require 'tests/data/Calculation/Information/IS_EVEN.php';
}
- /**
- * @dataProvider providerIsEvenArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsEvenArray')]
public function testIsEvenArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsLogicalTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsLogicalTest.php
index ea53a56dcb..e00cccb3bb 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsLogicalTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsLogicalTest.php
@@ -16,9 +16,7 @@ public function testIsLogicalNoArgument(): void
self::assertFalse($result);
}
- /**
- * @dataProvider providerIsLogical
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsLogical')]
public function testIsLogical(bool $expectedResult, mixed $value): void
{
$result = Value::isLogical($value);
@@ -30,9 +28,7 @@ public static function providerIsLogical(): array
return require 'tests/data/Calculation/Information/IS_LOGICAL.php';
}
- /**
- * @dataProvider providerIsLogicalArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsLogicalArray')]
public function testIsLogicalArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNaTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNaTest.php
index 87e6be25b3..72b8413678 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNaTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNaTest.php
@@ -16,9 +16,7 @@ public function testIsNaNoArgument(): void
self::assertFalse($result);
}
- /**
- * @dataProvider providerIsNa
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNa')]
public function testIsNa(bool $expectedResult, mixed $value): void
{
$result = ErrorValue::isNa($value);
@@ -30,9 +28,7 @@ public static function providerIsNa(): array
return require 'tests/data/Calculation/Information/IS_NA.php';
}
- /**
- * @dataProvider providerIsNaArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNaArray')]
public function testIsNaArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNonTextTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNonTextTest.php
index e84c835cc7..c639c93a53 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNonTextTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNonTextTest.php
@@ -16,9 +16,7 @@ public function testIsNonTextNoArgument(): void
self::assertTrue($result);
}
- /**
- * @dataProvider providerIsNonText
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNonText')]
public function testIsNonText(bool $expectedResult, mixed $value): void
{
$result = Value::isNonText($value);
@@ -30,9 +28,7 @@ public static function providerIsNonText(): array
return require 'tests/data/Calculation/Information/IS_NONTEXT.php';
}
- /**
- * @dataProvider providerIsNonTextArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNonTextArray')]
public function testIsNonTextArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNumberTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNumberTest.php
index 91850022cc..180fbc22d7 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNumberTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsNumberTest.php
@@ -16,9 +16,7 @@ public function testIsNumberNoArgument(): void
self::assertFalse($result);
}
- /**
- * @dataProvider providerIsNumber
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNumber')]
public function testIsNumber(bool $expectedResult, mixed $value): void
{
$result = Value::isNumber($value);
@@ -30,9 +28,7 @@ public static function providerIsNumber(): array
return require 'tests/data/Calculation/Information/IS_NUMBER.php';
}
- /**
- * @dataProvider providerIsNumberArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsNumberArray')]
public function testIsNumberArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsOddTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsOddTest.php
index fb94d483c0..6ff3d6ec38 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsOddTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsOddTest.php
@@ -17,9 +17,7 @@ public function testIsOddNoArgument(): void
self::assertSame(ExcelError::NAME(), $result);
}
- /**
- * @dataProvider providerIsOdd
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsOdd')]
public function testIsOdd(bool|string $expectedResult, mixed $value): void
{
$result = Value::isOdd($value);
@@ -31,9 +29,7 @@ public static function providerIsOdd(): array
return require 'tests/data/Calculation/Information/IS_ODD.php';
}
- /**
- * @dataProvider providerIsOddArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsOddArray')]
public function testIsOddArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsTextTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsTextTest.php
index 0fee579c09..f75e2ff172 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsTextTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/IsTextTest.php
@@ -16,9 +16,7 @@ public function testIsTextNoArgument(): void
self::assertFalse($result);
}
- /**
- * @dataProvider providerIsText
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsText')]
public function testIsText(bool $expectedResult, mixed $value): void
{
$result = Value::isText($value);
@@ -30,9 +28,7 @@ public static function providerIsText(): array
return require 'tests/data/Calculation/Information/IS_TEXT.php';
}
- /**
- * @dataProvider providerIsTextArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsTextArray')]
public function testIsTextArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/NTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/NTest.php
index 2224ad87ae..8c534dba2d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/NTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/NTest.php
@@ -15,9 +15,7 @@ public function testNNoArgument(): void
self::assertSame(0, $result);
}
- /**
- * @dataProvider providerN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerN')]
public function testN(mixed $expectedResult, mixed $value): void
{
$result = Value::asNumber($value);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/TypeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/TypeTest.php
index 4b36ccd6db..63ff4712ba 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Information/TypeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Information/TypeTest.php
@@ -15,9 +15,7 @@ public function testTypeNoArgument(): void
self::assertSame(1, $result);
}
- /**
- * @dataProvider providerTYPE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTYPE')]
public function testTYPE(int $expectedResult, mixed $value): void
{
$result = Value::type($value);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/AndTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/AndTest.php
index 277318cf28..e1eb46aa14 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/AndTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/AndTest.php
@@ -6,9 +6,7 @@
class AndTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAND
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAND')]
public function testAND(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('AND', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerAND(): array
return require 'tests/data/Calculation/Logical/AND.php';
}
- /**
- * @dataProvider providerANDLiteral
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerANDLiteral')]
public function testANDLiteral(bool|string $expectedResult, float|int|string $formula): void
{
$sheet = $this->getSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfErrorTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfErrorTest.php
index 6329c9b0e8..adb98070dc 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfErrorTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfErrorTest.php
@@ -8,9 +8,7 @@
class IfErrorTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerIFERROR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIFERROR')]
public function testIFERROR(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('IFERROR', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerIFERROR(): array
return require 'tests/data/Calculation/Logical/IFERROR.php';
}
- /**
- * @dataProvider providerIfErrorArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIfErrorArray')]
public function testIfErrorArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfNaTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfNaTest.php
index a629bd7ab1..f0fb8fdaaa 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfNaTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfNaTest.php
@@ -8,9 +8,7 @@
class IfNaTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerIFNA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIFNA')]
public function testIFNA(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('IFNA', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerIFNA(): array
return require 'tests/data/Calculation/Logical/IFNA.php';
}
- /**
- * @dataProvider providerIfNaArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIfNaArray')]
public function testIfNaArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfTest.php
index fc631043ae..ebe5f3b545 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfTest.php
@@ -6,9 +6,7 @@
class IfTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerIF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIF')]
public function testIF(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('IF', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfsTest.php
index eeb38b9a28..ff52852d87 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/IfsTest.php
@@ -8,9 +8,7 @@
class IfsTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerIFS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIFS')]
public function testIFS(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('IFS', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerIFS(): array
return require 'tests/data/Calculation/Logical/IFS.php';
}
- /**
- * @dataProvider providerIfsArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIfsArray')]
public function testIfsArray(array $expectedResult, string $bool1, string $argument1, string $bool2, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/NotTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/NotTest.php
index db53b38949..a4a0716430 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/NotTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/NotTest.php
@@ -8,9 +8,7 @@
class NotTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerNOT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNOT')]
public function testNOT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('NOT', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerNOT(): array
return require 'tests/data/Calculation/Logical/NOT.php';
}
- /**
- * @dataProvider providerNotArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNotArray')]
public function testNotArray(array $expectedResult, string $argument1): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/OrTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/OrTest.php
index c54448e038..1b975aa0dc 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/OrTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/OrTest.php
@@ -6,9 +6,7 @@
class OrTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerOR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOR')]
public function testOR(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('OR', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerOR(): array
return require 'tests/data/Calculation/Logical/OR.php';
}
- /**
- * @dataProvider providerORLiteral
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerORLiteral')]
public function testORLiteral(bool|string $expectedResult, float|int|string $formula): void
{
$sheet = $this->getSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/SwitchTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/SwitchTest.php
index c07daa8b49..b1311f38c8 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/SwitchTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/SwitchTest.php
@@ -8,9 +8,7 @@
class SwitchTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSwitch
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSwitch')]
public function testSWITCH(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('SWITCH', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerSwitch(): array
return require 'tests/data/Calculation/Logical/SWITCH.php';
}
- /**
- * @dataProvider providerSwitchArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSwitchArray')]
public function testIfsArray(array $expectedResult, int $expression, int $value1, string $result1, int $value2, string $result2, string $default): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/XorTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/XorTest.php
index e319cbb4a4..ea4a8bb066 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/XorTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/XorTest.php
@@ -6,9 +6,7 @@
class XorTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerXOR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerXOR')]
public function testXOR(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCase('XOR', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerXOR(): array
return require 'tests/data/Calculation/Logical/XOR.php';
}
- /**
- * @dataProvider providerXORLiteral
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerXORLiteral')]
public function xtestXORLiteral(mixed $expectedResult, string $formula): void
{
$sheet = $this->getSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressInternationalTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressInternationalTest.php
index d7aa9101c6..0c9b84e9eb 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressInternationalTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressInternationalTest.php
@@ -24,9 +24,7 @@ protected function tearDown(): void
parent::tearDown();
}
- /**
- * @dataProvider providerInternational
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerInternational')]
public function testR1C1International(string $locale, string $r, string $c): void
{
if ($locale !== '') {
@@ -55,9 +53,7 @@ public static function providerInternational(): array
];
}
- /**
- * @dataProvider providerCompatibility
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCompatibility')]
public function testCompatibilityInternational(string $compatibilityMode, string $r, string $c): void
{
Functions::setCompatibilityMode($compatibilityMode);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressTest.php
index 0bb9833ab2..0fa5b2f8de 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AddressTest.php
@@ -10,9 +10,7 @@
class AddressTest extends TestCase
{
- /**
- * @dataProvider providerADDRESS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerADDRESS')]
public function testADDRESS(mixed $expectedResult, mixed ...$args): void
{
$result = LookupRef\Address::cell(...$args);
@@ -24,9 +22,7 @@ public static function providerADDRESS(): array
return require 'tests/data/Calculation/LookupRef/ADDRESS.php';
}
- /**
- * @dataProvider providerAddressArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAddressArray')]
public function testAddressArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ChooseTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ChooseTest.php
index 7a495a5ca3..815ee8f2d2 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ChooseTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ChooseTest.php
@@ -10,9 +10,7 @@
class ChooseTest extends TestCase
{
- /**
- * @dataProvider providerCHOOSE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCHOOSE')]
public function testCHOOSE(mixed $expectedResult, mixed ...$args): void
{
$result = LookupRef\Selection::choose(...$args);
@@ -24,9 +22,7 @@ public static function providerCHOOSE(): array
return require 'tests/data/Calculation/LookupRef/CHOOSE.php';
}
- /**
- * @dataProvider providerChooseArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerChooseArray')]
public function testChooseArray(array $expectedResult, string $values, array $selections): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnOnSpreadsheetTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnOnSpreadsheetTest.php
index de7a6cc229..3382a1e38d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnOnSpreadsheetTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnOnSpreadsheetTest.php
@@ -8,9 +8,7 @@
class ColumnOnSpreadsheetTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOLUMNonSpreadsheet
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOLUMNonSpreadsheet')]
public function testColumnOnSpreadsheet(mixed $expectedResult, string $cellReference = 'omitted'): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnTest.php
index 9b007b0a93..eb16ae6d80 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnTest.php
@@ -8,9 +8,7 @@
class ColumnTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOLUMN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOLUMN')]
public function testCOLUMN(mixed $expectedResult, null|array|string $cellReference = null): void
{
$result = LookupRef\RowColumnInformation::COLUMN($cellReference);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsOnSpreadsheetTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsOnSpreadsheetTest.php
index 76c866e5ca..f3814d4f95 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsOnSpreadsheetTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsOnSpreadsheetTest.php
@@ -8,9 +8,7 @@
class ColumnsOnSpreadsheetTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOLUMNSonSpreadsheet
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOLUMNSonSpreadsheet')]
public function testColumnsOnSpreadsheet(mixed $expectedResult, string $cellReference = 'omitted'): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsTest.php
index 641119a9d7..74696967df 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/ColumnsTest.php
@@ -10,9 +10,7 @@
class ColumnsTest extends TestCase
{
- /**
- * @dataProvider providerCOLUMNS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOLUMNS')]
public function testCOLUMNS(mixed $expectedResult, null|array|string $arg): void
{
$result = LookupRef\RowColumnInformation::COLUMNS($arg);
@@ -24,9 +22,7 @@ public static function providerCOLUMNS(): array
return require 'tests/data/Calculation/LookupRef/COLUMNS.php';
}
- /**
- * @dataProvider providerColumnsArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerColumnsArray')]
public function testColumnsArray(int $expectedResult, string $argument): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/FormulaTextTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/FormulaTextTest.php
index 23a52cab33..0b13cc8fb9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/FormulaTextTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/FormulaTextTest.php
@@ -11,9 +11,7 @@
*/
class FormulaTextTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFormulaText
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormulaText')]
public function testFormulaText(string $expectedResult, mixed $value): void
{
$sheet = $this->getSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HLookupTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HLookupTest.php
index 682a12e021..679cbe28b1 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HLookupTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HLookupTest.php
@@ -12,9 +12,7 @@
class HLookupTest extends TestCase
{
- /**
- * @dataProvider providerHLOOKUP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHLOOKUP')]
public function testHLOOKUP(mixed $expectedResult, mixed $lookup, array $values, mixed $rowIndex, ?bool $rangeLookup = null): void
{
$spreadsheet = new Spreadsheet();
@@ -72,9 +70,7 @@ public static function providerHLOOKUP(): array
return require 'tests/data/Calculation/LookupRef/HLOOKUP.php';
}
- /**
- * @dataProvider providerHLookupNamedRange
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHLookupNamedRange')]
public function testHLookupNamedRange(string $expectedResult, string $cellAddress): void
{
$lookupData = [
@@ -110,9 +106,7 @@ public static function providerHLookupNamedRange(): array
];
}
- /**
- * @dataProvider providerHLookupArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHLookupArray')]
public function testHLookupArray(array $expectedResult, string $values, string $database, string $index): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HyperlinkTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HyperlinkTest.php
index 5e8420e14e..7e8f7d157a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HyperlinkTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HyperlinkTest.php
@@ -11,9 +11,7 @@ class HyperlinkTest extends AllSetupTeardown
{
private bool $issue2464 = true;
- /**
- * @dataProvider providerHYPERLINK
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHYPERLINK')]
public function testHYPERLINK(mixed $expectedResult, ?string $linkUrl, ?string $description): void
{
$this->mightHaveException($expectedResult);
@@ -39,9 +37,7 @@ public function testHYPERLINK(mixed $expectedResult, ?string $linkUrl, ?string $
}
}
- /**
- * @dataProvider providerHYPERLINK
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHYPERLINK')]
public function testHYPERLINKcellRef(mixed $expectedResult, ?string $linkUrl, ?string $description): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexOnSpreadsheetTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexOnSpreadsheetTest.php
index 3f508405ae..08cf905c5c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexOnSpreadsheetTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexOnSpreadsheetTest.php
@@ -6,9 +6,7 @@
class IndexOnSpreadsheetTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerINDEXonSpreadsheet
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerINDEXonSpreadsheet')]
public function testIndexOnSpreadsheet(mixed $expectedResult, array $matrix, null|int|string $rowNum = null, null|int|string $colNum = null): void
{
$this->mightHaveException($expectedResult);
@@ -35,9 +33,7 @@ public static function providerINDEXonSpreadsheet(): array
return require 'tests/data/Calculation/LookupRef/INDEXonSpreadsheet.php';
}
- /**
- * @dataProvider providerIndexLiteralArrays
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIndexLiteralArrays')]
public function testLiteralArrays(mixed $expectedResult, string $indexArgs): void
{
$sheet = $this->getSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexTest.php
index 9b3f5de2ec..930bfd8a99 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndexTest.php
@@ -11,9 +11,7 @@
class IndexTest extends TestCase
{
- /**
- * @dataProvider providerINDEX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerINDEX')]
public function testINDEX(mixed $expectedResult, mixed $matrix, mixed $rowNum = null, mixed $colNum = null): void
{
if ($rowNum === null) {
@@ -31,9 +29,7 @@ public static function providerINDEX(): array
return require 'tests/data/Calculation/LookupRef/INDEX.php';
}
- /**
- * @dataProvider providerIndexArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIndexArray')]
public function testIndexArray(array $expectedResult, string $matrix, string $rows, string $columns): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectInternationalTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectInternationalTest.php
index e0624ed8df..556b7c653f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectInternationalTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectInternationalTest.php
@@ -24,9 +24,7 @@ protected function tearDown(): void
parent::tearDown();
}
- /**
- * @dataProvider providerInternational
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerInternational')]
public function testR1C1International(string $locale): void
{
Settings::setLocale($locale);
@@ -79,9 +77,7 @@ public static function providerInternational(): array
];
}
- /**
- * @dataProvider providerRelativeInternational
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRelativeInternational')]
public function testRelativeInternational(string $locale, string $cell, string $relative): void
{
Settings::setLocale($locale);
@@ -101,9 +97,7 @@ public static function providerRelativeInternational(): array
];
}
- /**
- * @dataProvider providerCompatibility
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCompatibility')]
public function testCompatibilityInternational(string $compatibilityMode): void
{
Functions::setCompatibilityMode($compatibilityMode);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectTest.php
index 4b29a787ce..2ffa013818 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectTest.php
@@ -10,9 +10,7 @@
class IndirectTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerINDIRECT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerINDIRECT')]
public function testINDIRECT(mixed $expectedResult, mixed $cellReference = 'omitted', mixed $a1 = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -132,9 +130,7 @@ public function testDeprecatedCall(): void
self::assertSame('This is it', $result);
}
- /**
- * @dataProvider providerRelative
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRelative')]
public function testR1C1Relative(string|int|null $expectedResult, string $address): void
{
$sheet = $this->getSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/LookupTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/LookupTest.php
index 7194fe3806..6e6c674376 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/LookupTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/LookupTest.php
@@ -11,9 +11,7 @@
class LookupTest extends TestCase
{
- /**
- * @dataProvider providerLOOKUP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLOOKUP')]
public function testLOOKUP(mixed $expectedResult, mixed ...$args): void
{
$result = LookupRef\Lookup::lookup(...$args);
@@ -25,9 +23,7 @@ public static function providerLOOKUP(): array
return require 'tests/data/Calculation/LookupRef/LOOKUP.php';
}
- /**
- * @dataProvider providerLookupArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLookupArray')]
public function testLookupArray(array $expectedResult, string $values, string $lookup, string $return): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatchTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatchTest.php
index 211680f7da..2acbccf404 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatchTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatchTest.php
@@ -8,9 +8,7 @@
class MatchTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMATCH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMATCH')]
public function testMATCH(mixed $expectedResult, mixed $input, array $array, null|float|int|string $type = null): void
{
if (is_array($expectedResult)) {
@@ -39,9 +37,7 @@ public function testMATCH(mixed $expectedResult, mixed $input, array $array, nul
self::assertEquals($expectedResult, $result);
}
- /**
- * @dataProvider providerMATCH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMATCH')]
public function testMATCHLibre(mixed $expectedResult, mixed $input, array $array, null|float|int|string $type = null): void
{
$this->setOpenOffice();
@@ -76,9 +72,7 @@ public static function providerMATCH(): array
return require 'tests/data/Calculation/LookupRef/MATCH.php';
}
- /**
- * @dataProvider providerMatchArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMatchArray')]
public function testMatchArray(array $expectedResult, string $values, string $selections): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatrixHelperFunctionsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatrixHelperFunctionsTest.php
index 62e3b03578..eeb2cec49a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatrixHelperFunctionsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/MatrixHelperFunctionsTest.php
@@ -9,18 +9,14 @@
class MatrixHelperFunctionsTest extends TestCase
{
- /**
- * @dataProvider columnVectorProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('columnVectorProvider')]
public function testIsColumnVector(bool $expectedResult, array $array): void
{
$result = Matrix::isColumnVector($array);
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider rowVectorProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('rowVectorProvider')]
public function testIsRowVector(bool $expectedResult, array $array): void
{
$result = Matrix::isRowVector($array);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/OffsetTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/OffsetTest.php
index 2bf7f67bc6..c6a66c4c27 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/OffsetTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/OffsetTest.php
@@ -9,9 +9,7 @@
class OffsetTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerOFFSET
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOFFSET')]
public function testOFFSET(mixed $expectedResult, null|string $cellReference = null): void
{
$result = LookupRef\Offset::OFFSET($cellReference);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowOnSpreadsheetTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowOnSpreadsheetTest.php
index 53fdbf0877..ca22fdcc86 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowOnSpreadsheetTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowOnSpreadsheetTest.php
@@ -8,9 +8,7 @@
class RowOnSpreadsheetTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerROWonSpreadsheet
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerROWonSpreadsheet')]
public function testRowOnSpreadsheet(mixed $expectedResult, string $cellReference = 'omitted'): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowTest.php
index fbc4c12d6b..9d8d8c3930 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowTest.php
@@ -8,9 +8,7 @@
class RowTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerROW
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerROW')]
public function testROW(mixed $expectedResult, null|array|string $cellReference = null): void
{
$result = LookupRef\RowColumnInformation::ROW($cellReference);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsOnSpreadsheetTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsOnSpreadsheetTest.php
index 5d21d9fc7e..aeb589c4d3 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsOnSpreadsheetTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsOnSpreadsheetTest.php
@@ -8,9 +8,7 @@
class RowsOnSpreadsheetTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerROWSonSpreadsheet
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerROWSonSpreadsheet')]
public function testRowsOnSpreadsheet(mixed $expectedResult, string $cellReference = 'omitted'): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsTest.php
index 11781aabc5..312304f60e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/RowsTest.php
@@ -10,9 +10,7 @@
class RowsTest extends TestCase
{
- /**
- * @dataProvider providerROWS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerROWS')]
public function testROWS(mixed $expectedResult, null|array|string $arg): void
{
$result = LookupRef\RowColumnInformation::ROWS($arg);
@@ -24,9 +22,7 @@ public static function providerROWS(): array
return require 'tests/data/Calculation/LookupRef/ROWS.php';
}
- /**
- * @dataProvider providerRowsArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRowsArray')]
public function testRowsArray(int $expectedResult, string $argument): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortByTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortByTest.php
index 99e0a6e45d..7d2ba3ec7e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortByTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortByTest.php
@@ -18,9 +18,7 @@ public function testSortOnScalar(): void
self::assertSame($value, $result);
}
- /**
- * @dataProvider providerSortWithScalarArgumentErrorReturns
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSortWithScalarArgumentErrorReturns')]
public function testSortByWithArgumentErrorReturns(mixed $sortIndex, mixed $sortOrder = 1): void
{
$value = [[1, 2], [3, 4], [5, 6]];
@@ -41,9 +39,7 @@ public static function providerSortWithScalarArgumentErrorReturns(): array
];
}
- /**
- * @dataProvider providerSortByRow
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSortByRow')]
public function testSortByRow(array $expectedResult, array $matrix, mixed ...$args): void
{
$result = Sort::sortBy($matrix, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortTest.php
index 8334c20bff..2670caa16f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/SortTest.php
@@ -18,9 +18,7 @@ public function testSortOnScalar(): void
self::assertSame($value, $result);
}
- /**
- * @dataProvider providerSortWithScalarArgumentErrorReturns
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSortWithScalarArgumentErrorReturns')]
public function testSortWithScalarArgumentErrorReturns(mixed $sortIndex, mixed $sortOrder = 1): void
{
$value = [[1, 2], [3, 4], [5, 6]];
@@ -48,9 +46,7 @@ public static function providerSortWithScalarArgumentErrorReturns(): array
];
}
- /**
- * @dataProvider providerSortByRow
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSortByRow')]
public function testSortByRow(array $expectedResult, array $matrix, int $sortIndex, int $sortOrder = Sort::ORDER_ASCENDING): void
{
$result = Sort::sort($matrix, $sortIndex, $sortOrder);
@@ -79,9 +75,7 @@ public static function providerSortByRow(): array
];
}
- /**
- * @dataProvider providerSortByRowMultiLevel
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSortByRowMultiLevel')]
public function testSortByRowMultiLevel(array $expectedResult, array $matrix, array $sortIndex, int $sortOrder = Sort::ORDER_ASCENDING): void
{
$result = Sort::sort($matrix, $sortIndex, $sortOrder);
@@ -148,9 +142,7 @@ public static function providerSortByRowMultiLevel(): array
];
}
- /**
- * @dataProvider providerSortByColumn
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSortByColumn')]
public function testSortByColumn(array $expectedResult, array $matrix, int $sortIndex, int $sortOrder): void
{
$result = Sort::sort($matrix, $sortIndex, $sortOrder, true);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/TransposeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/TransposeTest.php
index 1892695698..67d0c2bde0 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/TransposeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/TransposeTest.php
@@ -15,9 +15,7 @@ protected function setUp(): void
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
}
- /**
- * @dataProvider providerTRANSPOSE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTRANSPOSE')]
public function testTRANSPOSE(mixed $expectedResult, mixed $matrix): void
{
$result = LookupRef\Matrix::transpose($matrix);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/UniqueTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/UniqueTest.php
index c7996ea2a6..3a38248be5 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/UniqueTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/UniqueTest.php
@@ -10,9 +10,7 @@
class UniqueTest extends TestCase
{
- /**
- * @dataProvider uniqueTestProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('uniqueTestProvider')]
public function testUnique(array $expectedResult, array $lookupRef, bool $byColumn = false, bool $exactlyOnce = false): void
{
$result = LookupRef\Unique::unique($lookupRef, $byColumn, $exactlyOnce);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/VLookupTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/VLookupTest.php
index ad320dfd0a..169f203a0c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/VLookupTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/VLookupTest.php
@@ -11,9 +11,7 @@
class VLookupTest extends TestCase
{
- /**
- * @dataProvider providerVLOOKUP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerVLOOKUP')]
public function testVLOOKUP(mixed $expectedResult, mixed $value, mixed $table, mixed $index, ?bool $lookup = null): void
{
$spreadsheet = new Spreadsheet();
@@ -50,9 +48,7 @@ public static function providerVLOOKUP(): array
return require 'tests/data/Calculation/LookupRef/VLOOKUP.php';
}
- /**
- * @dataProvider providerVLookupArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerVLookupArray')]
public function testVLookupArray(array $expectedResult, string $values, string $database, string $index): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AbsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AbsTest.php
index e16a05d77f..e3561996f3 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AbsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AbsTest.php
@@ -8,9 +8,7 @@
class AbsTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAbs
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAbs')]
public function testAbs(mixed $expectedResult, mixed $number = 'omitted'): void
{
$sheet = $this->getSheet();
@@ -30,9 +28,7 @@ public static function providerAbs(): array
return require 'tests/data/Calculation/MathTrig/ABS.php';
}
- /**
- * @dataProvider providerAbsArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAbsArray')]
public function testAbsoluteArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcosTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcosTest.php
index 8ba2e2a3a9..c4214f587f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcosTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcosTest.php
@@ -8,9 +8,7 @@
class AcosTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAcos
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAcos')]
public function testAcos(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerAcos(): array
return require 'tests/data/Calculation/MathTrig/ACOS.php';
}
- /**
- * @dataProvider providerAcosArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAcosArray')]
public function testAcosArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcoshTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcoshTest.php
index 98ca3353cc..9a31fa8d1c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcoshTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcoshTest.php
@@ -8,9 +8,7 @@
class AcoshTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAcosh
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAcosh')]
public function testAcosh(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerAcosh(): array
return require 'tests/data/Calculation/MathTrig/ACOSH.php';
}
- /**
- * @dataProvider providerAcoshArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAcoshArray')]
public function testAcoshArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcotTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcotTest.php
index 8e508aa158..3b85fff8fb 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcotTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcotTest.php
@@ -8,9 +8,7 @@
class AcotTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerACOT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerACOT')]
public function testACOT(float|int|string $expectedResult, float|int|string $number): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerACOT(): array
return require 'tests/data/Calculation/MathTrig/ACOT.php';
}
- /**
- * @dataProvider providerAcotArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAcotArray')]
public function testAcotArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcothTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcothTest.php
index 85ccdf44ad..1475d77d26 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcothTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AcothTest.php
@@ -8,9 +8,7 @@
class AcothTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerACOTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerACOTH')]
public function testACOTH(float|int|string $expectedResult, float|int|string $number): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerACOTH(): array
return require 'tests/data/Calculation/MathTrig/ACOTH.php';
}
- /**
- * @dataProvider providerAcothArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAcothArray')]
public function testAcothArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ArabicTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ArabicTest.php
index d5fd394a73..60e108272e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ArabicTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ArabicTest.php
@@ -8,9 +8,7 @@
class ArabicTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerARABIC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerARABIC')]
public function testARABIC(mixed $expectedResult, string $romanNumeral): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerARABIC(): array
return require 'tests/data/Calculation/MathTrig/ARABIC.php';
}
- /**
- * @dataProvider providerArabicArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerArabicArray')]
public function testArabicArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinTest.php
index 6024504c4c..cbf9914942 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinTest.php
@@ -8,9 +8,7 @@
class AsinTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAsin
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAsin')]
public function testAsin(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerAsin(): array
return require 'tests/data/Calculation/MathTrig/ASIN.php';
}
- /**
- * @dataProvider providerAsinArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAsinArray')]
public function testAsinArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinhTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinhTest.php
index 019ffb5507..2795b36a8b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinhTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinhTest.php
@@ -8,9 +8,7 @@
class AsinhTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAsinh
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAsinh')]
public function testAsinh(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerAsinh(): array
return require 'tests/data/Calculation/MathTrig/ASINH.php';
}
- /**
- * @dataProvider providerAsinhArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAsinhArray')]
public function testAsinhArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Atan2Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Atan2Test.php
index be37fdd241..bbfa4da2d2 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Atan2Test.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Atan2Test.php
@@ -8,9 +8,7 @@
class Atan2Test extends AllSetupTeardown
{
- /**
- * @dataProvider providerATAN2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerATAN2')]
public function testATAN2(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -27,9 +25,7 @@ public static function providerATAN2(): array
return require 'tests/data/Calculation/MathTrig/ATAN2.php';
}
- /**
- * @dataProvider providerAtan2Array
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAtan2Array')]
public function testAtan2Array(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanTest.php
index d4156d6c2e..7c217f81b2 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanTest.php
@@ -8,9 +8,7 @@
class AtanTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAtan
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAtan')]
public function testAtan(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerAtan(): array
return require 'tests/data/Calculation/MathTrig/ATAN.php';
}
- /**
- * @dataProvider providerAtanArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAtanArray')]
public function testAtanArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanhTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanhTest.php
index 0433535e3e..3a121aa943 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanhTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AtanhTest.php
@@ -8,9 +8,7 @@
class AtanhTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAtanh
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAtanh')]
public function testAtanh(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerAtanh(): array
return require 'tests/data/Calculation/MathTrig/ATANH.php';
}
- /**
- * @dataProvider providerAtanhArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAtanhArray')]
public function testAtanhArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/BaseTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/BaseTest.php
index 77b661c669..a1c5e4e0be 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/BaseTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/BaseTest.php
@@ -8,9 +8,7 @@
class BaseTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerBASE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBASE')]
public function testBASE(mixed $expectedResult, mixed $arg1 = 'omitted', mixed $arg2 = 'omitted', mixed $arg3 = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -42,9 +40,7 @@ public static function providerBASE(): array
return require 'tests/data/Calculation/MathTrig/BASE.php';
}
- /**
- * @dataProvider providerBaseArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBaseArray')]
public function testBaseArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingMathTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingMathTest.php
index 384600d5b5..78d947e173 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingMathTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingMathTest.php
@@ -8,9 +8,7 @@
class CeilingMathTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCEILINGMATH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCEILINGMATH')]
public function testCEILINGMATH(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerCEILINGMATH(): array
return require 'tests/data/Calculation/MathTrig/CEILINGMATH.php';
}
- /**
- * @dataProvider providerCeilingArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCeilingArray')]
public function testCeilingArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingPreciseTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingPreciseTest.php
index d6e60e5294..922500c81e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingPreciseTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingPreciseTest.php
@@ -8,9 +8,7 @@
class CeilingPreciseTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFLOORPRECISE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFLOORPRECISE')]
public function testCEILINGPRECISE(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerFLOORPRECISE(): array
return require 'tests/data/Calculation/MathTrig/CEILINGPRECISE.php';
}
- /**
- * @dataProvider providerCeilingArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCeilingArray')]
public function testCeilingArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingTest.php
index ba246a03e3..72cac55820 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CeilingTest.php
@@ -8,9 +8,7 @@
class CeilingTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCEILING
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCEILING')]
public function testCEILING(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -56,9 +54,7 @@ public function testCEILINGExcel1Arg(): void
self::assertEqualsWithDelta(6, $result, 1E-12);
}
- /**
- * @dataProvider providerCeilingArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCeilingArray')]
public function testCeilingArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinATest.php
index bc3d41ba81..0dced2da86 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinATest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinATest.php
@@ -8,9 +8,7 @@
class CombinATest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOMBINA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOMBINA')]
public function testCOMBINA(mixed $expectedResult, mixed $numObjs, mixed $numInSet): void
{
$this->mightHaveException($expectedResult);
@@ -31,9 +29,7 @@ public static function providerCOMBINA(): array
return require 'tests/data/Calculation/MathTrig/COMBINA.php';
}
- /**
- * @dataProvider providerCombinAArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCombinAArray')]
public function testCombinAArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinTest.php
index 6c4cdfa26c..ffe44293a9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CombinTest.php
@@ -8,9 +8,7 @@
class CombinTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOMBIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOMBIN')]
public function testCOMBIN(mixed $expectedResult, mixed $numObjs, mixed $numInSet): void
{
$this->mightHaveException($expectedResult);
@@ -31,9 +29,7 @@ public static function providerCOMBIN(): array
return require 'tests/data/Calculation/MathTrig/COMBIN.php';
}
- /**
- * @dataProvider providerCombinArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCombinArray')]
public function testCombinArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CosTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CosTest.php
index 0f5513d2da..538e2a964d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CosTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CosTest.php
@@ -8,9 +8,7 @@
class CosTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCos
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCos')]
public function testCos(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerCos(): array
return require 'tests/data/Calculation/MathTrig/COS.php';
}
- /**
- * @dataProvider providerCosArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCosArray')]
public function testCosArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CoshTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CoshTest.php
index 0239c1ee6f..40611d754b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CoshTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CoshTest.php
@@ -8,9 +8,7 @@
class CoshTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCosh
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCosh')]
public function testCosh(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerCosh(): array
return require 'tests/data/Calculation/MathTrig/COSH.php';
}
- /**
- * @dataProvider providerCoshArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCoshArray')]
public function testCoshArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CotTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CotTest.php
index d47520334e..c62a76befd 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CotTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CotTest.php
@@ -8,9 +8,7 @@
class CotTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOT')]
public function testCOT(float|int|string $expectedResult, float|int|string $angle): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerCOT(): array
return require 'tests/data/Calculation/MathTrig/COT.php';
}
- /**
- * @dataProvider providerCotArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCotArray')]
public function testCotArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CothTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CothTest.php
index d41b093708..445d97b448 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CothTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CothTest.php
@@ -8,9 +8,7 @@
class CothTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOTH')]
public function testCOTH(float|int|string $expectedResult, float|int|string $angle): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerCOTH(): array
return require 'tests/data/Calculation/MathTrig/COTH.php';
}
- /**
- * @dataProvider providerCothArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCothArray')]
public function testCothArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CscTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CscTest.php
index 5cf58296ea..9e835b5030 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CscTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CscTest.php
@@ -8,9 +8,7 @@
class CscTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCSC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCSC')]
public function testCSC(float|int|string $expectedResult, float|int|string $angle): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerCSC(): array
return require 'tests/data/Calculation/MathTrig/CSC.php';
}
- /**
- * @dataProvider providerCscArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCscArray')]
public function testCscArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CschTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CschTest.php
index 5865c4c822..77237729ef 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CschTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/CschTest.php
@@ -8,9 +8,7 @@
class CschTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCSCH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCSCH')]
public function testCSCH(float|int|string $expectedResult, float|int|string $angle): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerCSCH(): array
return require 'tests/data/Calculation/MathTrig/CSCH.php';
}
- /**
- * @dataProvider providerCschArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCschArray')]
public function testCschArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/DegreesTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/DegreesTest.php
index 14d3d72bd4..b6f5462663 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/DegreesTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/DegreesTest.php
@@ -8,9 +8,7 @@
class DegreesTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerDEGREES
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEGREES')]
public function testDegrees(mixed $expectedResult, mixed $number = 'omitted'): void
{
$sheet = $this->getSheet();
@@ -30,9 +28,7 @@ public static function providerDegrees(): array
return require 'tests/data/Calculation/MathTrig/DEGREES.php';
}
- /**
- * @dataProvider providerDegreesArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDegreesArray')]
public function testDegreesArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/EvenTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/EvenTest.php
index 4f56e921a0..653e4d083c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/EvenTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/EvenTest.php
@@ -8,9 +8,7 @@
class EvenTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerEVEN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEVEN')]
public function testEVEN(int|string $expectedResult, float|int|string $value): void
{
$this->mightHaveException($expectedResult);
@@ -25,9 +23,7 @@ public static function providerEVEN(): array
return require 'tests/data/Calculation/MathTrig/EVEN.php';
}
- /**
- * @dataProvider providerEvenArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEvenArray')]
public function testEvenArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ExpTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ExpTest.php
index 7af6b3b095..188acd934c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ExpTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ExpTest.php
@@ -8,9 +8,7 @@
class ExpTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerEXP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEXP')]
public function testEXP(mixed $expectedResult, mixed $number = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -32,9 +30,7 @@ public static function providerEXP(): array
return require 'tests/data/Calculation/MathTrig/EXP.php';
}
- /**
- * @dataProvider providerExpArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerExpArray')]
public function testExpArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactDoubleTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactDoubleTest.php
index e405c5d0f5..15f8159a2f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactDoubleTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactDoubleTest.php
@@ -8,9 +8,7 @@
class FactDoubleTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFACTDOUBLE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFACTDOUBLE')]
public function testFACTDOUBLE(mixed $expectedResult, mixed $value): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerFACTDOUBLE(): array
return require 'tests/data/Calculation/MathTrig/FACTDOUBLE.php';
}
- /**
- * @dataProvider providerFactDoubleArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFactDoubleArray')]
public function testFactDoubleArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactTest.php
index 1b1dbdb5c3..3ff4da9713 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FactTest.php
@@ -10,9 +10,7 @@ class FactTest extends AllSetupTeardown
{
const FACT_PRECISION = 1E-12;
- /**
- * @dataProvider providerFACT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFACT')]
public function testFACT(mixed $expectedResult, mixed $arg1): void
{
$this->mightHaveException($expectedResult);
@@ -34,9 +32,7 @@ public static function providerFACT(): array
return require 'tests/data/Calculation/MathTrig/FACT.php';
}
- /**
- * @dataProvider providerFACTGnumeric
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFACTGnumeric')]
public function testFACTGnumeric(mixed $expectedResult, mixed $arg1): void
{
$this->mightHaveException($expectedResult);
@@ -59,9 +55,7 @@ public static function providerFACTGnumeric(): array
return require 'tests/data/Calculation/MathTrig/FACTGNUMERIC.php';
}
- /**
- * @dataProvider providerFactArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFactArray')]
public function testFactArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorMathTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorMathTest.php
index f91076a239..5f528cc865 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorMathTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorMathTest.php
@@ -8,9 +8,7 @@
class FloorMathTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFLOORMATH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFLOORMATH')]
public function testFLOORMATH(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerFLOORMATH(): array
return require 'tests/data/Calculation/MathTrig/FLOORMATH.php';
}
- /**
- * @dataProvider providerFloorArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFloorArray')]
public function testFloorArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorPreciseTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorPreciseTest.php
index 3a43822e94..74d3ce4064 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorPreciseTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorPreciseTest.php
@@ -8,9 +8,7 @@
class FloorPreciseTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFLOORPRECISE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFLOORPRECISE')]
public function testFLOORPRECISE(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerFLOORPRECISE(): array
return require 'tests/data/Calculation/MathTrig/FLOORPRECISE.php';
}
- /**
- * @dataProvider providerFloorArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFloorArray')]
public function testFloorArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorTest.php
index 3d56fb3282..df19f229e1 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/FloorTest.php
@@ -8,9 +8,7 @@
class FloorTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFLOOR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFLOOR')]
public function testFLOOR(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -56,9 +54,7 @@ public function testFLOORExcel1Arg(): void
self::assertEqualsWithDelta(5, $result, 1E-12);
}
- /**
- * @dataProvider providerFloorArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFloorArray')]
public function testFloorArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/GcdTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/GcdTest.php
index e7684ba14a..20103cbfd6 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/GcdTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/GcdTest.php
@@ -6,9 +6,7 @@
class GcdTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerGCD
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGCD')]
public function testGCD(mixed $expectedResult, mixed ...$args): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/IntTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/IntTest.php
index 7f551e3430..0e81fcafb1 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/IntTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/IntTest.php
@@ -8,9 +8,7 @@
class IntTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerINT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerINT')]
public function testINT(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerINT(): array
return require 'tests/data/Calculation/MathTrig/INT.php';
}
- /**
- * @dataProvider providerIntArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIntArray')]
public function testIntArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LcmTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LcmTest.php
index 13d3b99402..d27358f5c4 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LcmTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LcmTest.php
@@ -6,9 +6,7 @@
class LcmTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerLCM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLCM')]
public function testLCM(mixed $expectedResult, mixed ...$args): void
{
$sheet = $this->getSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LnTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LnTest.php
index ca7eb78e86..774e2bc835 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LnTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LnTest.php
@@ -8,9 +8,7 @@
class LnTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerLN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLN')]
public function testLN(mixed $expectedResult, mixed $number = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -32,9 +30,7 @@ public static function providerLN(): array
return require 'tests/data/Calculation/MathTrig/LN.php';
}
- /**
- * @dataProvider providerLnArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLnArray')]
public function testLnArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Log10Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Log10Test.php
index 63ff4e9521..52635d426a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Log10Test.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/Log10Test.php
@@ -8,9 +8,7 @@
class Log10Test extends AllSetupTeardown
{
- /**
- * @dataProvider providerLOG10
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLOG10')]
public function testLOG10(mixed $expectedResult, mixed $number = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -32,9 +30,7 @@ public static function providerLOG10(): array
return require 'tests/data/Calculation/MathTrig/LOG10.php';
}
- /**
- * @dataProvider providerLog10Array
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLog10Array')]
public function testLog10Array(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LogTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LogTest.php
index 69cd275be2..62afdd287d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LogTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/LogTest.php
@@ -8,9 +8,7 @@
class LogTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerLOG
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLOG')]
public function testLOG(mixed $expectedResult, mixed $number = 'omitted', mixed $base = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -37,9 +35,7 @@ public static function providerLOG(): array
return require 'tests/data/Calculation/MathTrig/LOG.php';
}
- /**
- * @dataProvider providerLogArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLogArray')]
public function testLogArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MInverseTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MInverseTest.php
index 63c118572f..cc98cab1aa 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MInverseTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MInverseTest.php
@@ -8,9 +8,7 @@
class MInverseTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMINVERSE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMINVERSE')]
public function testMINVERSE(mixed $expectedResult, array $args): void
{
$result = MathTrig\MatrixFunctions::inverse($args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MMultTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MMultTest.php
index 86ee26fd9c..8925151f78 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MMultTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MMultTest.php
@@ -8,9 +8,7 @@
class MMultTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMMULT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMMULT')]
public function testMMULT(mixed $expectedResult, mixed ...$args): void
{
$result = MathTrig\MatrixFunctions::multiply(...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MRoundTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MRoundTest.php
index eab6e20ae9..32020c71fb 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MRoundTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MRoundTest.php
@@ -8,9 +8,7 @@
class MRoundTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMROUND
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMROUND')]
public function testMROUND(float|int|string $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerMROUND(): array
return require 'tests/data/Calculation/MathTrig/MROUND.php';
}
- /**
- * @dataProvider providerMRoundArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMRoundArray')]
public function testMRoundArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MdeTermTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MdeTermTest.php
index cd9b090a9e..f171cf6f80 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MdeTermTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MdeTermTest.php
@@ -6,9 +6,7 @@
class MdeTermTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMDETERM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMDETERM')]
public function testMDETERM2(float|int|string $expectedResult, array|int|float|string $matrix): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ModTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ModTest.php
index f33b886509..bbedd1f3db 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ModTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ModTest.php
@@ -8,9 +8,7 @@
class ModTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMOD
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMOD')]
public function testMOD(mixed $expectedResult, mixed $dividend = 'omitted', mixed $divisor = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -37,9 +35,7 @@ public static function providerMOD(): array
return require 'tests/data/Calculation/MathTrig/MOD.php';
}
- /**
- * @dataProvider providerModArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerModArray')]
public function testModArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MultinomialTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MultinomialTest.php
index ce189b44ef..695d63c798 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MultinomialTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/MultinomialTest.php
@@ -6,9 +6,7 @@
class MultinomialTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMULTINOMIAL
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMULTINOMIAL')]
public function testMULTINOMIAL(mixed $expectedResult, mixed ...$args): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/OddTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/OddTest.php
index d73235a7cd..a61259643b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/OddTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/OddTest.php
@@ -8,9 +8,7 @@
class OddTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerODD
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerODD')]
public function testODD(int|string $expectedResult, float|int|string $value): void
{
$this->mightHaveException($expectedResult);
@@ -25,9 +23,7 @@ public static function providerODD(): array
return require 'tests/data/Calculation/MathTrig/ODD.php';
}
- /**
- * @dataProvider providerOddArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOddArray')]
public function testOddArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PiTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PiTest.php
index 130f02f980..71337d1b52 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PiTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PiTest.php
@@ -6,9 +6,7 @@
class PiTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPI
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPI')]
public function testPI(mixed $expectedResult, mixed $number = 'omitted'): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PowerTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PowerTest.php
index 0bf42f09a8..abf9f7ef30 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PowerTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/PowerTest.php
@@ -8,9 +8,7 @@
class PowerTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPOWER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPOWER')]
public function testPOWER(mixed $expectedResult, mixed $base = 'omitted', mixed $exponent = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -37,9 +35,7 @@ public static function providerPOWER(): array
return require 'tests/data/Calculation/MathTrig/POWER.php';
}
- /**
- * @dataProvider providerPowerArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPowerArray')]
public function testPowerArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ProductTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ProductTest.php
index 7b4bc296e3..34bbf0db98 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ProductTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/ProductTest.php
@@ -6,9 +6,7 @@
class ProductTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPRODUCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPRODUCT')]
public function testPRODUCT(mixed $expectedResult, mixed ...$args): void
{
$sheet = $this->getSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/QuotientTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/QuotientTest.php
index 84c2856be4..eb5827d5ba 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/QuotientTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/QuotientTest.php
@@ -8,9 +8,7 @@
class QuotientTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerQUOTIENT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerQUOTIENT')]
public function testQUOTIENT(mixed $expectedResult, mixed $arg1 = 'omitted', mixed $arg2 = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -37,9 +35,7 @@ public static function providerQUOTIENT(): array
return require 'tests/data/Calculation/MathTrig/QUOTIENT.php';
}
- /**
- * @dataProvider providerQuotientArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerQuotientArray')]
public function testQuotientArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RadiansTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RadiansTest.php
index fb3c784eb1..63dfb7fd08 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RadiansTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RadiansTest.php
@@ -8,9 +8,7 @@
class RadiansTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerRADIANS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRADIANS')]
public function testRADIANS(mixed $expectedResult, mixed $number = 'omitted'): void
{
$sheet = $this->getSheet();
@@ -30,9 +28,7 @@ public static function providerRADIANS(): array
return require 'tests/data/Calculation/MathTrig/RADIANS.php';
}
- /**
- * @dataProvider providerRadiansArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRadiansArray')]
public function testRadiansArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RandBetweenTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RandBetweenTest.php
index 6086685f91..9b64991b5d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RandBetweenTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RandBetweenTest.php
@@ -8,9 +8,7 @@
class RandBetweenTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerRANDBETWEEN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRANDBETWEEN')]
public function testRANDBETWEEN(int|string $expectedResult, null|bool|int|string $min = 'omitted', null|bool|int|string $max = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -44,9 +42,7 @@ public static function providerRANDBETWEEN(): array
return require 'tests/data/Calculation/MathTrig/RANDBETWEEN.php';
}
- /**
- * @dataProvider providerRandBetweenArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRandBetweenArray')]
public function testRandBetweenArray(
int $expectedRows,
int $expectedColumns,
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RomanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RomanTest.php
index de8be1b07e..57096ac275 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RomanTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RomanTest.php
@@ -8,9 +8,7 @@
class RomanTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerROMAN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerROMAN')]
public function testROMAN(string $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerROMAN(): array
return require 'tests/data/Calculation/MathTrig/ROMAN.php';
}
- /**
- * @dataProvider providerRomanArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRomanArray')]
public function testRomanArray(array $expectedResult, string $values, string $styles): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundDownTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundDownTest.php
index 2f5945d3f3..7c440df13e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundDownTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundDownTest.php
@@ -8,9 +8,7 @@
class RoundDownTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerRoundDown
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRoundDown')]
public function testRoundDown(float|int|string $expectedResult, float|int|string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerRoundDown(): array
return require 'tests/data/Calculation/MathTrig/ROUNDDOWN.php';
}
- /**
- * @dataProvider providerRoundDownArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRoundDownArray')]
public function testRoundDownArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundTest.php
index 91dcc86109..c10c982d1b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundTest.php
@@ -8,9 +8,7 @@
class RoundTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerRound
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRound')]
public function testRound(float|int|string $expectedResult, float|int|string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerRound(): array
return require 'tests/data/Calculation/MathTrig/ROUND.php';
}
- /**
- * @dataProvider providerRoundArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRoundArray')]
public function testRoundArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundUpTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundUpTest.php
index 79a32ed682..d7629357b8 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundUpTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/RoundUpTest.php
@@ -8,9 +8,7 @@
class RoundUpTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerRoundUp
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRoundUp')]
public function testRoundUp(float|int|string $expectedResult, float|int|string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerRoundUp(): array
return require 'tests/data/Calculation/MathTrig/ROUNDUP.php';
}
- /**
- * @dataProvider providerRoundUpArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRoundUpArray')]
public function testRoundUpArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SecTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SecTest.php
index 3c391b6871..e05c99b8ee 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SecTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SecTest.php
@@ -8,9 +8,7 @@
class SecTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSEC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSEC')]
public function testSEC(float|int|string $expectedResult, float|int|string $angle): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerSEC(): array
return require 'tests/data/Calculation/MathTrig/SEC.php';
}
- /**
- * @dataProvider providerSecArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSecArray')]
public function testSecArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SechTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SechTest.php
index 632685070f..d2e4df742a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SechTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SechTest.php
@@ -8,9 +8,7 @@
class SechTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSECH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSECH')]
public function testSECH(float|int|string $expectedResult, float|int|string $angle): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerSECH(): array
return require 'tests/data/Calculation/MathTrig/SECH.php';
}
- /**
- * @dataProvider providerSechArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSechArray')]
public function testSechArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SequenceTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SequenceTest.php
index c3b1196c0d..c52f998734 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SequenceTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SequenceTest.php
@@ -9,11 +9,10 @@
class SequenceTest extends AllSetupTeardown
{
/**
- * @dataProvider providerSEQUENCE
- *
* @param mixed[] $arguments
* @param mixed[]|string $expectedResult
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSEQUENCE')]
public function testSEQUENCE(array $arguments, array|string $expectedResult): void
{
if (count($arguments) === 0) {
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SeriesSumTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SeriesSumTest.php
index 8608f91c87..5f3469f18d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SeriesSumTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SeriesSumTest.php
@@ -9,9 +9,7 @@
class SeriesSumTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSERIESSUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSERIESSUM')]
public function testSERIESSUM(mixed $expectedResult, mixed $arg1, mixed $arg2, mixed $arg3, mixed ...$args): void
{
$sheet = $this->getSheet();
@@ -42,9 +40,7 @@ public static function providerSERIESSUM(): array
return require 'tests/data/Calculation/MathTrig/SERIESSUM.php';
}
- /**
- * @dataProvider providerSeriesSumArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSeriesSumArray')]
public function testSeriesSumArray(array $expectedResult, string $x, string $n, string $m, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SignTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SignTest.php
index a767de73d6..2a77d6eb3d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SignTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SignTest.php
@@ -8,9 +8,7 @@
class SignTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSIGN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSIGN')]
public function testSIGN(float|int|string $expectedResult, float|int|string $value): void
{
$this->mightHaveException($expectedResult);
@@ -28,9 +26,7 @@ public static function providerSIGN(): array
return require 'tests/data/Calculation/MathTrig/SIGN.php';
}
- /**
- * @dataProvider providerSignArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSignArray')]
public function testSignArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinTest.php
index 83bc295f80..ea78813616 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinTest.php
@@ -8,9 +8,7 @@
class SinTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSin
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSin')]
public function testSin(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerSin(): array
return require 'tests/data/Calculation/MathTrig/SIN.php';
}
- /**
- * @dataProvider providerSinArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSinArray')]
public function testSinArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinhTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinhTest.php
index 0ad727757e..50b7b32c41 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinhTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SinhTest.php
@@ -8,9 +8,7 @@
class SinhTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCosh
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCosh')]
public function testSinh(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerCosh(): array
return require 'tests/data/Calculation/MathTrig/SINH.php';
}
- /**
- * @dataProvider providerSinhArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSinhArray')]
public function testSinhArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtPiTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtPiTest.php
index e6a1e783d3..1aecc8b6ee 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtPiTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtPiTest.php
@@ -8,9 +8,7 @@
class SqrtPiTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSQRTPI
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSQRTPI')]
public function testSQRTPI(mixed $expectedResult, mixed $number): void
{
$this->mightHaveException($expectedResult);
@@ -32,9 +30,7 @@ public static function providerSQRTPI(): array
return require 'tests/data/Calculation/MathTrig/SQRTPI.php';
}
- /**
- * @dataProvider providerSqrtPiArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSqrtPiArray')]
public function testSqrtPiArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtTest.php
index 4bd348ffc7..4e4fea06cb 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SqrtTest.php
@@ -8,9 +8,7 @@
class SqrtTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSQRT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSQRT')]
public function testSQRT(mixed $expectedResult, mixed $number = 'omitted'): void
{
$sheet = $this->getSheet();
@@ -30,9 +28,7 @@ public static function providerSqrt(): array
return require 'tests/data/Calculation/MathTrig/SQRT.php';
}
- /**
- * @dataProvider providerSqrtArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSqrtArray')]
public function testSqrtArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SubTotalTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SubTotalTest.php
index cc694aa495..6a2e5c59a5 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SubTotalTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SubTotalTest.php
@@ -6,9 +6,7 @@
class SubTotalTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSUBTOTAL
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUBTOTAL')]
public function testSubtotal(float|int|string $expectedResult, float|int|string $type): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerSUBTOTAL(): array
return require 'tests/data/Calculation/MathTrig/SUBTOTAL.php';
}
- /**
- * @dataProvider providerSUBTOTAL
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUBTOTAL')]
public function testSubtotalColumnHidden(float|int|string $expectedResult, float|int|string $type): void
{
// Hidden columns don't affect calculation, only hidden rows
@@ -60,9 +56,7 @@ public function testSubtotalColumnHidden(float|int|string $expectedResult, float
self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
}
- /**
- * @dataProvider providerSUBTOTALHIDDEN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUBTOTALHIDDEN')]
public function testSubtotalRowHidden(mixed $expectedResult, int $type): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumIfTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumIfTest.php
index 1f61aa8632..9199ada28e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumIfTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumIfTest.php
@@ -6,9 +6,7 @@
class SumIfTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSUMIF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUMIF')]
public function testSUMIF2(mixed $expectedResult, array $array1, mixed $condition, ?array $array2 = null): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumIfsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumIfsTest.php
index eca29781f2..fbf6032ef8 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumIfsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumIfsTest.php
@@ -8,9 +8,7 @@
class SumIfsTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSUMIFS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUMIFS')]
public function testSUMIFS(mixed $expectedResult, mixed ...$args): void
{
$result = Statistical\Conditional::SUMIFS(...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumProductTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumProductTest.php
index 2158894b94..ddb4ddafc0 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumProductTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumProductTest.php
@@ -8,9 +8,7 @@
class SumProductTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSUMPRODUCT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUMPRODUCT')]
public function testSUMPRODUCT(mixed $expectedResult, mixed ...$args): void
{
$sheet = $this->getSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumSqTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumSqTest.php
index 41b3e4c61f..7af25a1b8b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumSqTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumSqTest.php
@@ -6,9 +6,7 @@
class SumSqTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSUMSQ
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUMSQ')]
public function testSUMSQ(mixed $expectedResult, mixed ...$args): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumTest.php
index 5c9bd238d8..dfa27f35fc 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumTest.php
@@ -8,9 +8,7 @@
class SumTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSUM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUM')]
public function testSUM(mixed $expectedResult, mixed ...$args): void
{
$sheet = $this->getSheet();
@@ -29,9 +27,7 @@ public static function providerSUM(): array
return require 'tests/data/Calculation/MathTrig/SUM.php';
}
- /**
- * @dataProvider providerSUMLiterals
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUMLiterals')]
public function testSUMLiterals(mixed $expectedResult, string $args): void
{
$sheet = $this->getSheet();
@@ -45,9 +41,7 @@ public static function providerSUMLiterals(): array
return require 'tests/data/Calculation/MathTrig/SUMLITERALS.php';
}
- /**
- * @dataProvider providerSUMWITHINDEXMATCH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUMWITHINDEXMATCH')]
public function testSumWithIndexMatch(mixed $expectedResult, string $formula): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumX2MY2Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumX2MY2Test.php
index c7d1bf8c2b..9e36ac572b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumX2MY2Test.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumX2MY2Test.php
@@ -8,9 +8,7 @@
class SumX2MY2Test extends AllSetupTeardown
{
- /**
- * @dataProvider providerSUMX2MY2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUMX2MY2')]
public function testSUMX2MY2(mixed $expectedResult, array $matrixData1, array $matrixData2): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumX2PY2Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumX2PY2Test.php
index b75ea02dfc..46bc3e17ce 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumX2PY2Test.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumX2PY2Test.php
@@ -8,9 +8,7 @@
class SumX2PY2Test extends AllSetupTeardown
{
- /**
- * @dataProvider providerSUMX2PY2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUMX2PY2')]
public function testSUMX2PY2(mixed $expectedResult, array $matrixData1, array $matrixData2): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumXMY2Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumXMY2Test.php
index 4cce0ada0e..d4f91a8cd9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumXMY2Test.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/SumXMY2Test.php
@@ -8,9 +8,7 @@
class SumXMY2Test extends AllSetupTeardown
{
- /**
- * @dataProvider providerSUMXMY2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUMXMY2')]
public function testSUMXMY2(mixed $expectedResult, array $matrixData1, array $matrixData2): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanTest.php
index c21d451a1b..b58562c1ce 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanTest.php
@@ -8,9 +8,7 @@
class TanTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTan
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTan')]
public function testTan(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerTan(): array
return require 'tests/data/Calculation/MathTrig/TAN.php';
}
- /**
- * @dataProvider providerTanArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTanArray')]
public function testTanArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanhTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanhTest.php
index 8de5d6803e..31f704b224 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanhTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TanhTest.php
@@ -8,9 +8,7 @@
class TanhTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTanh
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTanh')]
public function testTanh(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -26,9 +24,7 @@ public static function providerTanh(): array
return require 'tests/data/Calculation/MathTrig/TANH.php';
}
- /**
- * @dataProvider providerTanhArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTanhArray')]
public function testTanhArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TruncTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TruncTest.php
index 9e610f234f..0f6bd0b977 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TruncTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/TruncTest.php
@@ -8,9 +8,7 @@
class TruncTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTRUNC
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTRUNC')]
public function testTRUNC(mixed $expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerTRUNC(): array
return require 'tests/data/Calculation/MathTrig/TRUNC.php';
}
- /**
- * @dataProvider providerTruncArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTruncArray')]
public function testTruncArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
@@ -48,9 +44,7 @@ public static function providerTruncArray(): array
];
}
- /**
- * @dataProvider providerTooMuchPrecision
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTooMuchPrecision')]
public function testTooMuchPrecision(mixed $expectedResult, float|int|string $value, int $digits = 1): void
{
// This test is pretty screwy. Possibly shouldn't even attempt it.
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AveDevTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AveDevTest.php
index ea9c61ef84..7b58094a7a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AveDevTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AveDevTest.php
@@ -6,9 +6,7 @@
class AveDevTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAVEDEV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAVEDEV')]
public function testAVEDEV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('AVEDEV', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageATest.php
index 48788ab402..d8a7542c35 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageATest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageATest.php
@@ -6,9 +6,7 @@
class AverageATest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAVERAGEA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAVERAGEA')]
public function testAVERAGEA(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('AVERAGEA', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageIfTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageIfTest.php
index 2b23a77d24..62db48efa5 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageIfTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageIfTest.php
@@ -8,9 +8,7 @@
class AverageIfTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAVERAGEIF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAVERAGEIF')]
public function testAVERAGEIF(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('AVERAGEIF', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageIfsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageIfsTest.php
index e3f835809d..9aecc553ee 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageIfsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageIfsTest.php
@@ -8,9 +8,7 @@
class AverageIfsTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAVERAGEIFS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAVERAGEIFS')]
public function testAVERAGEIFS(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('AVERAGEIFS', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageTest.php
index 078a8313b2..21e24c149f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AverageTest.php
@@ -6,9 +6,7 @@
class AverageTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerAVERAGE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAVERAGE')]
public function testAVERAGE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('AVERAGE', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaDistTest.php
index 2a25cbfe6f..a50693c00e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaDistTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaDistTest.php
@@ -8,9 +8,7 @@
class BetaDistTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerBETADIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBETADIST')]
public function testBETADIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('BETADIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerBETADIST(): array
return require 'tests/data/Calculation/Statistical/BETADIST.php';
}
- /**
- * @dataProvider providerBetaDistArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBetaDistArray')]
public function testBetaDistArray(array $expectedResult, string $argument1, string $argument2, string $argument3): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaInvTest.php
index eab0cf4ba1..7550510d14 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaInvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BetaInvTest.php
@@ -8,9 +8,7 @@
class BetaInvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerBETAINV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBETAINV')]
public function testBETAINV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('BETAINV', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerBETAINV(): array
return require 'tests/data/Calculation/Statistical/BETAINV.php';
}
- /**
- * @dataProvider providerBetaInvArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBetaInvArray')]
public function testBetaInvArray(array $expectedResult, string $argument1, string $argument2, string $argument3): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistRangeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistRangeTest.php
index 9a8ac452fc..6ac55ec890 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistRangeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistRangeTest.php
@@ -8,9 +8,7 @@
class BinomDistRangeTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerBINOMDISTRANGE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBINOMDISTRANGE')]
public function testBINOMDISTRANGE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('BINOM.DIST.RANGE', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerBINOMDISTRANGE(): array
return require 'tests/data/Calculation/Statistical/BINOMDISTRANGE.php';
}
- /**
- * @dataProvider providerBinomDistRangeArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBinomDistRangeArray')]
public function testBinomDistRangeArray(
array $expectedResult,
string $trials,
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistTest.php
index 5f824d7178..94b1b71a5d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomDistTest.php
@@ -8,9 +8,7 @@
class BinomDistTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerBINOMDIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBINOMDIST')]
public function testBINOMDIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('BINOMDIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerBINOMDIST(): array
return require 'tests/data/Calculation/Statistical/BINOMDIST.php';
}
- /**
- * @dataProvider providerBinomDistArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBinomDistArray')]
public function testBinomDistArray(
array $expectedResult,
string $values,
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomInvTest.php
index ecd12285c2..9cddd74629 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomInvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/BinomInvTest.php
@@ -8,9 +8,7 @@
class BinomInvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerBINOMINV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBINOMINV')]
public function testBINOMINV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('BINOM.INV', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerBINOMINV(): array
return require 'tests/data/Calculation/Statistical/BINOMINV.php';
}
- /**
- * @dataProvider providerBinomInvArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBinomInvArray')]
public function testBinomInvArray(
array $expectedResult,
string $trials,
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistLeftTailTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistLeftTailTest.php
index ba9e26438e..e0581e7f77 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistLeftTailTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistLeftTailTest.php
@@ -8,9 +8,7 @@
class ChiDistLeftTailTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCHIDIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCHIDIST')]
public function testCHIDIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('CHISQ.DIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerCHIDIST(): array
return require 'tests/data/Calculation/Statistical/CHIDISTLeftTail.php';
}
- /**
- * @dataProvider providerChiDistLeftTailArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerChiDistLeftTailArray')]
public function testChiDistLeftTailArray(array $expectedResult, string $values, string $degrees): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistRightTailTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistRightTailTest.php
index 94835eb614..b2a3e18f6f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistRightTailTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiDistRightTailTest.php
@@ -8,9 +8,7 @@
class ChiDistRightTailTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCHIDIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCHIDIST')]
public function testCHIDIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('CHISQ.DIST.RT', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerCHIDIST(): array
return require 'tests/data/Calculation/Statistical/CHIDISTRightTail.php';
}
- /**
- * @dataProvider providerChiDistRightTailArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerChiDistRightTailArray')]
public function testChiDistRightTailArray(array $expectedResult, string $values, string $degrees): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvLeftTailTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvLeftTailTest.php
index 483575756b..475cf88876 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvLeftTailTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvLeftTailTest.php
@@ -8,9 +8,7 @@
class ChiInvLeftTailTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCHIINV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCHIINV')]
public function testCHIINV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('CHISQ.INV', $expectedResult, ...$args);
@@ -36,9 +34,7 @@ public function invVersusDistTest(): void
self::assertEqualsWithDelta($probability, $result, 1.0e-8);
}
- /**
- * @dataProvider providerChiInvLeftTailArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerChiInvLeftTailArray')]
public function testChiInvLeftTailArray(array $expectedResult, string $probabilities, string $degrees): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvRightTailTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvRightTailTest.php
index 971ea55151..a09d14be4a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvRightTailTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiInvRightTailTest.php
@@ -8,9 +8,7 @@
class ChiInvRightTailTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCHIINV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCHIINV')]
public function testCHIINV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('CHISQ.INV.RT', $expectedResult, ...$args);
@@ -36,9 +34,7 @@ public function invVersusDistTest(): void
self::assertEqualsWithDelta($probability, $result, 1.0e-8);
}
- /**
- * @dataProvider providerChiInvRightTailArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerChiInvRightTailArray')]
public function testChiInvRightTailArray(array $expectedResult, string $probabilities, string $degrees): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiTestTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiTestTest.php
index 0059a9de8b..ea3b2ab0cd 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiTestTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ChiTestTest.php
@@ -10,9 +10,7 @@
// TODO Convert to Spreadsheet context.
class ChiTestTest extends TestCase
{
- /**
- * @dataProvider providerCHITEST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCHITEST')]
public function testCHITEST(mixed $expectedResult, mixed $actual, mixed $expected): void
{
$result = Statistical\Distributions\ChiSquared::test($actual, $expected);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ConfidenceTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ConfidenceTest.php
index 006ad32eb0..2ea9ac53dc 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ConfidenceTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ConfidenceTest.php
@@ -8,9 +8,7 @@
class ConfidenceTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCONFIDENCE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCONFIDENCE')]
public function testCONFIDENCE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('CONFIDENCE', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerCONFIDENCE(): array
return require 'tests/data/Calculation/Statistical/CONFIDENCE.php';
}
- /**
- * @dataProvider providerConfidenceArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerConfidenceArray')]
public function testConfidenceArray(array $expectedResult, string $alpha, string $stdDev, string $size): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CorrelTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CorrelTest.php
index e832a89e7b..c698cb896e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CorrelTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CorrelTest.php
@@ -9,9 +9,7 @@
class CorrelTest extends TestCase
{
- /**
- * @dataProvider providerCORREL
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCORREL')]
public function testCORREL(mixed $expectedResult, mixed $xargs, mixed $yargs): void
{
$result = Statistical\Trends::CORREL($xargs, $yargs);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountATest.php
index 381b1384d2..61e1f1cdfc 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountATest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountATest.php
@@ -6,9 +6,7 @@
class CountATest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOUNTA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOUNTA')]
public function testCOUNTA(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('COUNTA', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountBlankTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountBlankTest.php
index e5f44f78d1..4856547617 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountBlankTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountBlankTest.php
@@ -8,9 +8,7 @@
class CountBlankTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOUNTBLANK
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOUNTBLANK')]
public function testCOUNTBLANK(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('COUNTBLANK', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountIfTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountIfTest.php
index 794751d6f0..a4e803138b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountIfTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountIfTest.php
@@ -6,9 +6,7 @@
class CountIfTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOUNTIF
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOUNTIF')]
public function testCOUNTIF(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('COUNTIF', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountIfsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountIfsTest.php
index 54c8a05bef..1c589a6113 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountIfsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountIfsTest.php
@@ -7,9 +7,7 @@
// TODO There are some commented out cases which don't return correct value
class CountIfsTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOUNTIFS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOUNTIFS')]
public function testCOUNTIFS(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('COUNTIFS', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountTest.php
index ef951be3f1..1074d74acf 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CountTest.php
@@ -6,9 +6,7 @@
class CountTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerBasicCOUNT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBasicCOUNT')]
public function testBasicCOUNT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('COUNT', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerBasicCOUNT(): array
return require 'tests/data/Calculation/Statistical/BasicCOUNT.php';
}
- /**
- * @dataProvider providerExcelCOUNT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerExcelCOUNT')]
public function testExcelCOUNT(mixed $expectedResult, mixed ...$args): void
{
if (is_array($args[0])) {
@@ -36,9 +32,7 @@ public static function providerExcelCOUNT(): array
return require 'tests/data/Calculation/Statistical/ExcelCOUNT.php';
}
- /**
- * @dataProvider providerOpenOfficeCOUNT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOpenOfficeCOUNT')]
public function testOpenOfficeCOUNT(mixed $expectedResult, mixed ...$args): void
{
$this->setOpenOffice();
@@ -54,9 +48,7 @@ public static function providerOpenOfficeCOUNT(): array
return require 'tests/data/Calculation/Statistical/OpenOfficeCOUNT.php';
}
- /**
- * @dataProvider providerGnumericCOUNT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGnumericCOUNT')]
public function testGnumericCOUNT(mixed $expectedResult, mixed ...$args): void
{
$this->setGnumeric();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CovarTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CovarTest.php
index 63b11e8d3f..2c7f51a153 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CovarTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CovarTest.php
@@ -6,9 +6,7 @@
class CovarTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCOVAR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCOVAR')]
public function testCOVAR(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('COVAR', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/DevSqTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/DevSqTest.php
index e239e105a9..993723aacd 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/DevSqTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/DevSqTest.php
@@ -6,9 +6,7 @@
class DevSqTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerDEVSQ
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDEVSQ')]
public function testDEVSQ(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('DEVSQ', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ExponDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ExponDistTest.php
index 2cb5b64cbb..516783c6b1 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ExponDistTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ExponDistTest.php
@@ -8,9 +8,7 @@
class ExponDistTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerEXPONDIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEXPONDIST')]
public function testEXPONDIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('EXPONDIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerEXPONDIST(): array
return require 'tests/data/Calculation/Statistical/EXPONDIST.php';
}
- /**
- * @dataProvider providerExponDistArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerExponDistArray')]
public function testExponDistArray(array $expectedResult, string $values, string $lambdas): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FDistTest.php
index 6c6478f288..20aad121a8 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FDistTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FDistTest.php
@@ -8,9 +8,7 @@
class FDistTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFDIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFDIST')]
public function testFDIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('F.DIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerFDIST(): array
return require 'tests/data/Calculation/Statistical/FDIST.php';
}
- /**
- * @dataProvider providerFDistArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFDistArray')]
public function testFDistArray(array $expectedResult, string $values, string $u, string $v): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherInvTest.php
index aa3189742e..2a5eaaadd0 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherInvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherInvTest.php
@@ -8,9 +8,7 @@
class FisherInvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFISHERINV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFISHERINV')]
public function testFISHERINV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('FISHERINV', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerFISHERINV(): array
return require 'tests/data/Calculation/Statistical/FISHERINV.php';
}
- /**
- * @dataProvider providerFisherArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFisherArray')]
public function testFisherArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherTest.php
index 352a3afc53..d0f369ebd9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/FisherTest.php
@@ -8,9 +8,7 @@
class FisherTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFISHER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFISHER')]
public function testFISHER(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('FISHER', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerFISHER(): array
return require 'tests/data/Calculation/Statistical/FISHER.php';
}
- /**
- * @dataProvider providerFisherArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFisherArray')]
public function testFisherArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ForecastTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ForecastTest.php
index 396e69e0ba..8dee257100 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ForecastTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ForecastTest.php
@@ -12,9 +12,7 @@
// Note that null in reference is treated differently than null in array.
class ForecastTest extends TestCase
{
- /**
- * @dataProvider providerFORECAST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFORECAST')]
public function testFORECAST(mixed $expectedResult, mixed ...$args): void
{
$result = Statistical\Trends::FORECAST(...$args);
@@ -26,9 +24,7 @@ public static function providerFORECAST(): array
return require 'tests/data/Calculation/Statistical/FORECAST.php';
}
- /**
- * @dataProvider providerForecastArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerForecastArray')]
public function testForecastArray(array $expectedResult, string $testValues, string $yValues, string $xValues): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaDistTest.php
index 64ef50a5f3..0a63798217 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaDistTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaDistTest.php
@@ -8,9 +8,7 @@
class GammaDistTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerGAMMADIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGAMMADIST')]
public function testGAMMADIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('GAMMA.DIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerGAMMADIST(): array
return require 'tests/data/Calculation/Statistical/GAMMADIST.php';
}
- /**
- * @dataProvider providerGammaDistArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGammaDistArray')]
public function testGammaDistArray(array $expectedResult, string $values, string $alpha, string $beta): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaInvTest.php
index b3d1a3409b..1b48f49982 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaInvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaInvTest.php
@@ -8,9 +8,7 @@
class GammaInvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerGAMMAINV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGAMMAINV')]
public function testGAMMAINV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('GAMMA.INV', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerGAMMAINV(): array
return require 'tests/data/Calculation/Statistical/GAMMAINV.php';
}
- /**
- * @dataProvider providerGammaInvArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGammaInvArray')]
public function testGammaInvArray(array $expectedResult, string $values, string $alpha, string $beta): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaLnTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaLnTest.php
index 8c9c4c76a3..d7e47b49ac 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaLnTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaLnTest.php
@@ -8,9 +8,7 @@
class GammaLnTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerGAMMALN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGAMMALN')]
public function testGAMMALN(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('GAMMALN', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerGAMMALN(): array
return require 'tests/data/Calculation/Statistical/GAMMALN.php';
}
- /**
- * @dataProvider providerGammaLnArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGammaLnArray')]
public function testGammaLnArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaTest.php
index 9db243cc02..ba246a55a0 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GammaTest.php
@@ -8,9 +8,7 @@
class GammaTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerGAMMA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGAMMA')]
public function testGAMMA(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('GAMMA', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerGAMMA(): array
return require 'tests/data/Calculation/Statistical/GAMMA.php';
}
- /**
- * @dataProvider providerGammaArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGammaArray')]
public function testGammaArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GaussTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GaussTest.php
index 4fb98f5ec5..528d47bb3e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GaussTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GaussTest.php
@@ -8,9 +8,7 @@
class GaussTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerGAUSS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGAUSS')]
public function testGAUSS(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('GAUSS', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerGAUSS(): array
return require 'tests/data/Calculation/Statistical/GAUSS.php';
}
- /**
- * @dataProvider providerGaussArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGaussArray')]
public function testGaussArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GeoMeanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GeoMeanTest.php
index f5b8b91b4f..c2fe6b8aa9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GeoMeanTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GeoMeanTest.php
@@ -6,9 +6,7 @@
class GeoMeanTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerGEOMEAN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGEOMEAN')]
public function testGEOMEAN(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('GEOMEAN', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GrowthTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GrowthTest.php
index 51d379a8d9..fc790889cc 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GrowthTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/GrowthTest.php
@@ -10,9 +10,7 @@
// TODO Run test in spreadsheet context
class GrowthTest extends TestCase
{
- /**
- * @dataProvider providerGROWTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGROWTH')]
public function testGROWTH(mixed $expectedResult, array $yValues, array $xValues, ?array $newValues = null, ?bool $const = null): void
{
if ($newValues === null) {
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HarMeanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HarMeanTest.php
index 497f8127cc..a991bc9854 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HarMeanTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HarMeanTest.php
@@ -6,9 +6,7 @@
class HarMeanTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerHARMEAN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHARMEAN')]
public function testHARMEAN(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('HARMEAN', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HypGeomDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HypGeomDistTest.php
index b240d874b0..92db287c2e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HypGeomDistTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/HypGeomDistTest.php
@@ -8,9 +8,7 @@
class HypGeomDistTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerHYPGEOMDIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHYPGEOMDIST')]
public function testHYPGEOMDIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('HYPGEOMDIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerHYPGEOMDIST(): array
return require 'tests/data/Calculation/Statistical/HYPGEOMDIST.php';
}
- /**
- * @dataProvider providerHypGeomDistArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHypGeomDistArray')]
public function testHypGeomDistArray(
array $expectedResult,
string $sampleSuccesses,
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/InterceptTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/InterceptTest.php
index c340c98997..0f0cc9a6fe 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/InterceptTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/InterceptTest.php
@@ -6,9 +6,7 @@
class InterceptTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerINTERCEPT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerINTERCEPT')]
public function testINTERCEPT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('INTERCEPT', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/KurtTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/KurtTest.php
index 1b2d791683..32d362e2e6 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/KurtTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/KurtTest.php
@@ -6,9 +6,7 @@
class KurtTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerKURT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerKURT')]
public function testKURT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('KURT', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LargeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LargeTest.php
index de1e4aa1ea..f3b50da55b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LargeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LargeTest.php
@@ -6,9 +6,7 @@
class LargeTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerLARGE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLARGE')]
public function testLARGE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('LARGE', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LinEstTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LinEstTest.php
index d8a3fd8bed..e7573b1508 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LinEstTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LinEstTest.php
@@ -10,9 +10,7 @@
// TODO run test in spreadsheet context
class LinEstTest extends TestCase
{
- /**
- * @dataProvider providerLINEST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLINEST')]
public function testLINEST(array $expectedResult, array $yValues, array $xValues, mixed $const, mixed $stats): void
{
$result = Statistical\Trends::LINEST($yValues, $xValues, $const, $stats);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogEstTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogEstTest.php
index 93524d2d07..c6ef9fd25a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogEstTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogEstTest.php
@@ -10,9 +10,7 @@
// TODO run test in spreadsheet context
class LogEstTest extends TestCase
{
- /**
- * @dataProvider providerLOGEST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLOGEST')]
public function testLOGEST(array $expectedResult, array $yValues, array $xValues, mixed $const, mixed $stats): void
{
$result = Statistical\Trends::LOGEST($yValues, $xValues, $const, $stats);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogInvTest.php
index fce4a4b246..25c5bc6653 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogInvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogInvTest.php
@@ -8,9 +8,7 @@
class LogInvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerLOGINV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLOGINV')]
public function testLOGINV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('LOGINV', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerLOGINV(): array
return require 'tests/data/Calculation/Statistical/LOGINV.php';
}
- /**
- * @dataProvider providerLogInvArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLogInvArray')]
public function testLogInvArray(array $expectedResult, string $probabilities, string $mean, string $stdDev): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDist2Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDist2Test.php
index 0857e54249..fd8f3fb4f9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDist2Test.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDist2Test.php
@@ -8,9 +8,7 @@
class LogNormDist2Test extends AllSetupTeardown
{
- /**
- * @dataProvider providerLOGNORMDIST2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLOGNORMDIST2')]
public function testLOGNORMDIST2(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('LOGNORM.DIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerLOGNORMDIST2(): array
return require 'tests/data/Calculation/Statistical/LOGNORMDIST2.php';
}
- /**
- * @dataProvider providerLogNormDist2Array
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLogNormDist2Array')]
public function testLogNormDist2Array(array $expectedResult, string $values, string $mean, string $stdDev): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDistTest.php
index fcb01d5a44..4820944a09 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDistTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/LogNormDistTest.php
@@ -8,9 +8,7 @@
class LogNormDistTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerLOGNORMDIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLOGNORMDIST')]
public function testLOGNORMDIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('LOGNORMDIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerLOGNORMDIST(): array
return require 'tests/data/Calculation/Statistical/LOGNORMDIST.php';
}
- /**
- * @dataProvider providerLogNormDistArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLogNormDistArray')]
public function testLogNormDistArray(array $expectedResult, string $values, string $mean, string $stdDev): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxATest.php
index 4e65e2db45..3d4470144d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxATest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxATest.php
@@ -6,9 +6,7 @@
class MaxATest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMAXA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMAXA')]
public function testMAXA(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('MAXA', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxIfsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxIfsTest.php
index 25a7ac696a..3af46098a5 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxIfsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxIfsTest.php
@@ -6,9 +6,7 @@
class MaxIfsTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMAXIFS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMAXIFS')]
public function testMAXIFS(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('MAXIFS', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxTest.php
index ea1e5110bd..03c0a86d46 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MaxTest.php
@@ -6,9 +6,7 @@
class MaxTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMAX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMAX')]
public function testMAX(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('MAX', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MedianTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MedianTest.php
index 2eeaf6042d..0abb86c2ae 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MedianTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MedianTest.php
@@ -6,9 +6,7 @@
class MedianTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMEDIAN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMEDIAN')]
public function testMEDIAN(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('MEDIAN', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinATest.php
index 28d417dae7..d825ef517c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinATest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinATest.php
@@ -6,9 +6,7 @@
class MinATest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMINA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMINA')]
public function testMINA(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('MINA', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinIfsTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinIfsTest.php
index 7fb91bfbcb..44d1dae7f2 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinIfsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinIfsTest.php
@@ -6,9 +6,7 @@
class MinIfsTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMINIFS
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMINIFS')]
public function testMINIFS(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('MINIFS', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinTest.php
index c699cfedf3..9777151738 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/MinTest.php
@@ -6,9 +6,7 @@
class MinTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerMIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMIN')]
public function testMIN(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('MIN', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ModeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ModeTest.php
index 5ae2c4977c..a61689fe0a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ModeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ModeTest.php
@@ -9,9 +9,7 @@
class ModeTest extends TestCase
{
- /**
- * @dataProvider providerMODE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMODE')]
public function testMODE(mixed $expectedResult, string $str): void
{
$workbook = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NegBinomDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NegBinomDistTest.php
index 7725556eef..3a83fed896 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NegBinomDistTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NegBinomDistTest.php
@@ -8,9 +8,7 @@
class NegBinomDistTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerNEGBINOMDIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNEGBINOMDIST')]
public function testNEGBINOMDIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('NEGBINOMDIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerNEGBINOMDIST(): array
return require 'tests/data/Calculation/Statistical/NEGBINOMDIST.php';
}
- /**
- * @dataProvider providerNegBinomDistArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNegBinomDistArray')]
public function testNegBinomDistArray(
array $expectedResult,
string $failures,
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormDistTest.php
index ba62123ec3..f9c444bf8e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormDistTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormDistTest.php
@@ -8,9 +8,7 @@
class NormDistTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerNORMDIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNORMDIST')]
public function testNORMDIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('NORMDIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerNORMDIST(): array
return require 'tests/data/Calculation/Statistical/NORMDIST.php';
}
- /**
- * @dataProvider providerNormDistArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNormDistArray')]
public function testNormDistArray(array $expectedResult, string $values, string $mean, string $stdDev): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormInvTest.php
index 5aa42fc85b..14a479c6fe 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormInvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormInvTest.php
@@ -8,9 +8,7 @@
class NormInvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerNORMINV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNORMINV')]
public function testNORMINV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('NORMINV', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerNORMINV(): array
return require 'tests/data/Calculation/Statistical/NORMINV.php';
}
- /**
- * @dataProvider providerNormInvArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNormInvArray')]
public function testNormInvArray(array $expectedResult, string $probabilities, string $mean, string $stdDev): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDist2Test.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDist2Test.php
index c85c125c7c..ea07827d68 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDist2Test.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDist2Test.php
@@ -8,9 +8,7 @@
class NormSDist2Test extends AllSetupTeardown
{
- /**
- * @dataProvider providerNORMSDIST2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNORMSDIST2')]
public function testNORMSDIST2(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('NORM.S.DIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerNORMSDIST2(): array
return require 'tests/data/Calculation/Statistical/NORMSDIST2.php';
}
- /**
- * @dataProvider providerNormSDist2Array
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNormSDist2Array')]
public function testNormSDist2Array(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDistTest.php
index 95d8ff32de..53b3aafe88 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDistTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSDistTest.php
@@ -8,9 +8,7 @@
class NormSDistTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerNORMSDIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNORMSDIST')]
public function testNORMSDIST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('NORMSDIST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerNORMSDIST(): array
return require 'tests/data/Calculation/Statistical/NORMSDIST.php';
}
- /**
- * @dataProvider providerNormSDistArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNormSDistArray')]
public function testNormSDistArray(array $expectedResult, string $values): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSInvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSInvTest.php
index e935538023..f763123318 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSInvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/NormSInvTest.php
@@ -8,9 +8,7 @@
class NormSInvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerNORMSINV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNORMSINV')]
public function testNORMSINV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('NORMSINV', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerNORMSINV(): array
return require 'tests/data/Calculation/Statistical/NORMSINV.php';
}
- /**
- * @dataProvider providerNormSInvArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNormSInvArray')]
public function testNormSInvArray(array $expectedResult, string $probabilities): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PercentRankTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PercentRankTest.php
index 153b768224..b931977b99 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PercentRankTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PercentRankTest.php
@@ -7,10 +7,9 @@
class PercentRankTest extends AllSetupTeardown
{
/**
- * @dataProvider providerPERCENTRANK
- *
* @param mixed[] $valueSet
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPERCENTRANK')]
public function testPERCENTRANK(mixed $expectedResult, mixed $valueSet, mixed $value, mixed $digits = null): void
{
if ($digits === null) {
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PercentileTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PercentileTest.php
index 47faff9e31..f3707768ec 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PercentileTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PercentileTest.php
@@ -6,9 +6,7 @@
class PercentileTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPERCENTILE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPERCENTILE')]
public function testPERCENTILE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('PERCENTILE', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutTest.php
index 75a7999564..94223ce82a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutTest.php
@@ -8,9 +8,7 @@
class PermutTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPERMUT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPERMUT')]
public function testPERMUT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('PERMUT', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerPERMUT(): array
return require 'tests/data/Calculation/Statistical/PERMUT.php';
}
- /**
- * @dataProvider providerPermutArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPermutArray')]
public function testPermutArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutationATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutationATest.php
index 2cfc6a567d..57cf1169a5 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutationATest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PermutationATest.php
@@ -8,9 +8,7 @@
class PermutationATest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPERMUT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPERMUT')]
public function testPERMUT(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('PERMUTATIONA', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerPERMUT(): array
return require 'tests/data/Calculation/Statistical/PERMUTATIONA.php';
}
- /**
- * @dataProvider providerPermutationAArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPermutationAArray')]
public function testPermutationAArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PoissonTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PoissonTest.php
index 2233a74eca..23bcbfa679 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PoissonTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/PoissonTest.php
@@ -8,9 +8,7 @@
class PoissonTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPOISSON
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPOISSON')]
public function testPOISSON(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('POISSON', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerPOISSON(): array
return require 'tests/data/Calculation/Statistical/POISSON.php';
}
- /**
- * @dataProvider providerPoissonArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPoissonArray')]
public function testPoissonArray(array $expectedResult, string $values, string $mean): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/QuartileTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/QuartileTest.php
index daf658b849..5afdc256e1 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/QuartileTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/QuartileTest.php
@@ -6,9 +6,7 @@
class QuartileTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerQUARTILE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerQUARTILE')]
public function testQUARTILE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('QUARTILE', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/RankTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/RankTest.php
index 6f2a5ae465..9eeffb958b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/RankTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/RankTest.php
@@ -7,10 +7,9 @@
class RankTest extends AllSetupTeardown
{
/**
- * @dataProvider providerRANK
- *
* @param mixed[] $valueSet
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRANK')]
public function testRANK(mixed $expectedResult, mixed $value, array $valueSet, mixed $order = null): void
{
if ($order === null) {
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/RsqTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/RsqTest.php
index fba99b1b82..49fa2541f9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/RsqTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/RsqTest.php
@@ -6,9 +6,7 @@
class RsqTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerRSQ
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRSQ')]
public function testRSQ(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('RSQ', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SkewTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SkewTest.php
index f88287cc33..fad689b61c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SkewTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SkewTest.php
@@ -6,9 +6,7 @@
class SkewTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSKEW
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSKEW')]
public function testSKEW(mixed $expectedResult, array $args): void
{
$this->runTestCaseReference('SKEW', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SlopeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SlopeTest.php
index 12220561b7..e7ae4e320e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SlopeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SlopeTest.php
@@ -6,9 +6,7 @@
class SlopeTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSLOPE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSLOPE')]
public function testSLOPE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseNoBracket('SLOPE', $expectedResult, ...$args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SmallTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SmallTest.php
index 13dc6f99c4..25cf80b316 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SmallTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SmallTest.php
@@ -6,9 +6,7 @@
class SmallTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSMALL
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSMALL')]
public function testSMALL(mixed $expectedResult, mixed $values, mixed $position): void
{
$this->runTestCaseReference('SMALL', $expectedResult, $values, $position);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevATest.php
index c6964f9487..5971dbb492 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevATest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevATest.php
@@ -6,9 +6,7 @@
class StDevATest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSTDEVA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSTDEVA')]
public function testSTDEVA(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('STDEVA', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerSTDEVA(): array
return require 'tests/data/Calculation/Statistical/STDEVA.php';
}
- /**
- * @dataProvider providerOdsSTDEVA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOdsSTDEVA')]
public function testOdsSTDEVA(mixed $expectedResult, mixed ...$args): void
{
$this->setOpenOffice();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevPATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevPATest.php
index db309b2f7a..6c1d5e7c2e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevPATest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevPATest.php
@@ -6,9 +6,7 @@
class StDevPATest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSTDEVPA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSTDEVPA')]
public function testSTDEVPA(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('STDEVPA', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerSTDEVPA(): array
return require 'tests/data/Calculation/Statistical/STDEVPA.php';
}
- /**
- * @dataProvider providerOdsSTDEVPA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOdsSTDEVPA')]
public function testOdsSTDEVPA(mixed $expectedResult, mixed ...$args): void
{
$this->setOpenOffice();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevPTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevPTest.php
index 89898d2a1e..e3d067d672 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevPTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevPTest.php
@@ -6,9 +6,7 @@
class StDevPTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSTDEVP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSTDEVP')]
public function testSTDEVP(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('STDEVP', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerSTDEVP(): array
return require 'tests/data/Calculation/Statistical/STDEVP.php';
}
- /**
- * @dataProvider providerOdsSTDEVP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOdsSTDEVP')]
public function testOdsSTDEVP(mixed $expectedResult, mixed ...$args): void
{
$this->setOpenOffice();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevTest.php
index b920621533..b0712dcb54 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StDevTest.php
@@ -6,9 +6,7 @@
class StDevTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSTDEV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSTDEV')]
public function testSTDEV(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('STDEV', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerSTDEV(): array
return require 'tests/data/Calculation/Statistical/STDEV.php';
}
- /**
- * @dataProvider providerOdsSTDEV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOdsSTDEV')]
public function testOdsSTDEV(mixed $expectedResult, mixed ...$args): void
{
$this->setOpenOffice();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StandardizeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StandardizeTest.php
index 8defe4c03c..02846869de 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StandardizeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/StandardizeTest.php
@@ -8,9 +8,7 @@
class StandardizeTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSTANDARDIZE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSTANDARDIZE')]
public function testSTANDARDIZE(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('STANDARDIZE', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerSTANDARDIZE(): array
return require 'tests/data/Calculation/Statistical/STANDARDIZE.php';
}
- /**
- * @dataProvider providerStandardizeArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerStandardizeArray')]
public function testStandardizeArray(array $expectedResult, string $argument1, string $argument2, string $argument3): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SteyxTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SteyxTest.php
index 5c195630a1..9cabfe0bdf 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SteyxTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SteyxTest.php
@@ -6,9 +6,7 @@
class SteyxTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSTEYX
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSTEYX')]
public function testSTEYX(mixed $expectedResult, array $xargs, array $yargs): void
{
//$result = Statistical\Trends::STEYX($xargs, $yargs);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDistTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDistTest.php
index c57deb2663..19811cf230 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDistTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TDistTest.php
@@ -8,9 +8,7 @@
class TDistTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTDIST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTDIST')]
public function testTDIST(mixed $expectedResult, mixed $value, mixed $degrees, mixed $tails): void
{
$this->runTestCaseReference('TDIST', $expectedResult, $value, $degrees, $tails);
@@ -21,9 +19,7 @@ public static function providerTDIST(): array
return require 'tests/data/Calculation/Statistical/TDIST.php';
}
- /**
- * @dataProvider providerTDistArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTDistArray')]
public function testTDistArray(array $expectedResult, string $values, string $degrees, string $tails): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TinvTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TinvTest.php
index ed16e9dbaa..bdbabebfb7 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TinvTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TinvTest.php
@@ -8,9 +8,7 @@
class TinvTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTINV
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTINV')]
public function testTINV(mixed $expectedResult, mixed $probability, mixed $degrees): void
{
$this->runTestCaseReference('TINV', $expectedResult, $probability, $degrees);
@@ -21,9 +19,7 @@ public static function providerTINV(): array
return require 'tests/data/Calculation/Statistical/TINV.php';
}
- /**
- * @dataProvider providerTInvArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTInvArray')]
public function testTInvArray(array $expectedResult, string $values, string $degrees): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TrendTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TrendTest.php
index 1a09ce9b4c..a9ee4a33fa 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TrendTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TrendTest.php
@@ -10,9 +10,7 @@
// TODO Run test in spreadsheet context.
class TrendTest extends TestCase
{
- /**
- * @dataProvider providerGROWTH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGROWTH')]
public function testTREND(mixed $expectedResult, array $yValues, array $xValues, ?array $newValues = null, ?bool $const = null): void
{
if ($newValues === null) {
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TrimMeanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TrimMeanTest.php
index 1e6adfdcb5..b267e5c64f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TrimMeanTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/TrimMeanTest.php
@@ -6,9 +6,7 @@
class TrimMeanTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTRIMMEAN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTRIMMEAN')]
public function testTRIMMEAN(mixed $expectedResult, array $args, mixed $percentage): void
{
$this->runTestCaseReference('TRIMMEAN', $expectedResult, $args, $percentage);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarATest.php
index 084a452e42..bf39c05b8a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarATest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarATest.php
@@ -6,9 +6,7 @@
class VarATest extends AllSetupTeardown
{
- /**
- * @dataProvider providerVARA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerVARA')]
public function testVARA(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('VARA', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerVARA(): array
return require 'tests/data/Calculation/Statistical/VARA.php';
}
- /**
- * @dataProvider providerOdsVARA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOdsVARA')]
public function testOdsVARA(mixed $expectedResult, mixed ...$args): void
{
$this->setOpenOffice();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarPATest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarPATest.php
index 9c1e62fdb7..73b260003e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarPATest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarPATest.php
@@ -6,9 +6,7 @@
class VarPATest extends AllSetupTeardown
{
- /**
- * @dataProvider providerVARPA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerVARPA')]
public function testVARPA(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('VARPA', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerVARPA(): array
return require 'tests/data/Calculation/Statistical/VARPA.php';
}
- /**
- * @dataProvider providerOdsVARPA
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOdsVARPA')]
public function testOdsVARPA(mixed $expectedResult, mixed ...$args): void
{
$this->setOpenOffice();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarPTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarPTest.php
index 45f46d08b6..fb85dc077d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarPTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarPTest.php
@@ -6,9 +6,7 @@
class VarPTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerVARP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerVARP')]
public function testVARP(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('VARP', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerVARP(): array
return require 'tests/data/Calculation/Statistical/VARP.php';
}
- /**
- * @dataProvider providerOdsVARP
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOdsVARP')]
public function testOdsVARP(mixed $expectedResult, mixed ...$args): void
{
$this->setOpenOffice();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarTest.php
index c565b4177c..0b3d8c9f72 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarTest.php
@@ -6,9 +6,7 @@
class VarTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerVAR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerVAR')]
public function testVAR(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('VAR', $expectedResult, ...$args);
@@ -19,9 +17,7 @@ public static function providerVAR(): array
return require 'tests/data/Calculation/Statistical/VAR.php';
}
- /**
- * @dataProvider providerOdsVAR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOdsVAR')]
public function testOdsVAR(mixed $expectedResult, mixed ...$args): void
{
$this->setOpenOffice();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/WeibullTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/WeibullTest.php
index 533477525f..66d9e92754 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/WeibullTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/WeibullTest.php
@@ -8,9 +8,7 @@
class WeibullTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerWEIBULL
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWEIBULL')]
public function testWEIBULL(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCases('WEIBULL', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerWEIBULL(): array
return require 'tests/data/Calculation/Statistical/WEIBULL.php';
}
- /**
- * @dataProvider providerWeibullArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWeibullArray')]
public function testWeibullArray(array $expectedResult, string $values, string $alpha, string $beta): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ZTestTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ZTestTest.php
index 32ae58a1c6..b76f36b7fb 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ZTestTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/ZTestTest.php
@@ -8,9 +8,7 @@
class ZTestTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerZTEST
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerZTEST')]
public function testZTEST(mixed $expectedResult, mixed ...$args): void
{
$this->runTestCaseReference('ZTEST', $expectedResult, ...$args);
@@ -21,9 +19,7 @@ public static function providerZTEST(): array
return require 'tests/data/Calculation/Statistical/ZTEST.php';
}
- /**
- * @dataProvider providerZTestArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerZTestArray')]
public function testZTestArray(array $expectedResult, string $dataSet, string $m0): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ArrayToTextTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ArrayToTextTest.php
index 56d035729a..a65b3a18f4 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ArrayToTextTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ArrayToTextTest.php
@@ -6,9 +6,7 @@
class ArrayToTextTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerARRAYTOTEXT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerARRAYTOTEXT')]
public function testArrayToText(string $expectedResult, array $testData, int $mode): void
{
$worksheet = $this->getSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharNonPrintableTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharNonPrintableTest.php
index 370ec308c9..5dd049a2cf 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharNonPrintableTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharNonPrintableTest.php
@@ -9,9 +9,7 @@
class CharNonPrintableTest extends AbstractFunctional
{
- /**
- * @dataProvider providerType
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerType')]
public function testNotPrintable(string $type): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharTest.php
index e9549e4528..4782e9d668 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CharTest.php
@@ -8,9 +8,7 @@
class CharTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCHAR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCHAR')]
public function testCHAR(mixed $expectedResult, mixed $character = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -30,9 +28,7 @@ public static function providerCHAR(): array
return require 'tests/data/Calculation/TextData/CHAR.php';
}
- /**
- * @dataProvider providerCharArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCharArray')]
public function testCharArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CleanTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CleanTest.php
index 7b83438cd2..196f5a8d54 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CleanTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CleanTest.php
@@ -8,9 +8,7 @@
class CleanTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCLEAN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCLEAN')]
public function testCLEAN(mixed $expectedResult, mixed $value = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -30,9 +28,7 @@ public static function providerCLEAN(): array
return require 'tests/data/Calculation/TextData/CLEAN.php';
}
- /**
- * @dataProvider providerCleanArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCleanArray')]
public function testCleanArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CodeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CodeTest.php
index e29c057a69..c1ff8d8caf 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CodeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/CodeTest.php
@@ -8,9 +8,7 @@
class CodeTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCODE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCODE')]
public function testCODE(mixed $expectedResult, mixed $character = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -30,9 +28,7 @@ public static function providerCODE(): array
return require 'tests/data/Calculation/TextData/CODE.php';
}
- /**
- * @dataProvider providerCodeArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCodeArray')]
public function testCodeArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatTest.php
index 3e0c88f096..3438e1431b 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatTest.php
@@ -8,9 +8,7 @@
class ConcatTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCONCAT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCONCAT')]
public function testCONCAT(mixed $expectedResult, mixed ...$args): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatenateGnumericTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatenateGnumericTest.php
index 2b4f12a2f7..9f2697faea 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatenateGnumericTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatenateGnumericTest.php
@@ -10,9 +10,8 @@ class ConcatenateGnumericTest extends AllSetupTeardown
{
/**
* Gnumeric, unlike Excel or LibreOffice, implements CONCATENATE like CONCAT.
- *
- * @dataProvider providerCONCAT
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCONCAT')]
public function testCONCATENATE(mixed $expectedResult, mixed ...$args): void
{
self::setGnumeric();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatenateTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatenateTest.php
index 3a5f33cff5..7e2cfb2953 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatenateTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ConcatenateTest.php
@@ -9,9 +9,7 @@
class ConcatenateTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerCONCATENATE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCONCATENATE')]
public function testCONCATENATE(mixed $expectedResult, mixed ...$args): void
{
$this->mightHaveException($expectedResult);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/DollarTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/DollarTest.php
index 19c9dc3b6d..c383285fd8 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/DollarTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/DollarTest.php
@@ -8,9 +8,7 @@
class DollarTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerDOLLAR
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDOLLAR')]
public function testDOLLAR(mixed $expectedResult, mixed $amount = 'omitted', mixed $decimals = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -34,9 +32,7 @@ public static function providerDOLLAR(): array
return require 'tests/data/Calculation/TextData/DOLLAR.php';
}
- /**
- * @dataProvider providerDollarArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDollarArray')]
public function testDollarArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ExactTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ExactTest.php
index 802b73e4cc..9f3a15f633 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ExactTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ExactTest.php
@@ -8,9 +8,7 @@
class ExactTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerEXACT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEXACT')]
public function testEXACT(mixed $expectedResult, mixed $string1 = 'omitted', mixed $string2 = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -34,9 +32,7 @@ public static function providerEXACT(): array
return require 'tests/data/Calculation/TextData/EXACT.php';
}
- /**
- * @dataProvider providerExactArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerExactArray')]
public function testExactArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FindTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FindTest.php
index 6f5e187b83..5497f69c9a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FindTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FindTest.php
@@ -8,9 +8,7 @@
class FindTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFIND
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFIND')]
public function testFIND(mixed $expectedResult, mixed $string1 = 'omitted', mixed $string2 = 'omitted', mixed $start = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -39,9 +37,7 @@ public static function providerFIND(): array
return require 'tests/data/Calculation/TextData/FIND.php';
}
- /**
- * @dataProvider providerFindArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFindArray')]
public function testFindArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FixedTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FixedTest.php
index 0ee5c1cc39..a9ad677124 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FixedTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/FixedTest.php
@@ -8,9 +8,7 @@
class FixedTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerFIXED
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFIXED')]
public function testFIXED(mixed $expectedResult, mixed $number = 'omitted', mixed $decimals = 'omitted', mixed $noCommas = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -39,9 +37,7 @@ public static function providerFIXED(): array
return require 'tests/data/Calculation/TextData/FIXED.php';
}
- /**
- * @dataProvider providerFixedArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFixedArray')]
public function testFixedArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LeftTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LeftTest.php
index 94ac23fd43..f59e53311e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LeftTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LeftTest.php
@@ -11,11 +11,10 @@
class LeftTest extends AllSetupTeardown
{
/**
- * @dataProvider providerLEFT
- *
* @param mixed $str string from which to extract
* @param mixed $cnt number of characters to extract
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLEFT')]
public function testLEFT(mixed $expectedResult, mixed $str = 'omitted', mixed $cnt = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -39,9 +38,7 @@ public static function providerLEFT(): array
return require 'tests/data/Calculation/TextData/LEFT.php';
}
- /**
- * @dataProvider providerLocaleLEFT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLocaleLEFT')]
public function testLowerWithLocaleBoolean(string $expectedResult, string $locale, mixed $value, mixed $characters): void
{
$newLocale = Settings::setLocale($locale);
@@ -71,9 +68,7 @@ public static function providerLocaleLEFT(): array
];
}
- /**
- * @dataProvider providerCalculationTypeLEFTTrue
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCalculationTypeLEFTTrue')]
public function testCalculationTypeTrue(string $type, string $resultB1, string $resultB2): void
{
Functions::setCompatibilityMode($type);
@@ -107,9 +102,7 @@ public static function providerCalculationTypeLEFTTrue(): array
];
}
- /**
- * @dataProvider providerCalculationTypeLEFTFalse
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCalculationTypeLEFTFalse')]
public function testCalculationTypeFalse(string $type, string $resultB1, string $resultB2): void
{
Functions::setCompatibilityMode($type);
@@ -143,9 +136,7 @@ public static function providerCalculationTypeLEFTFalse(): array
];
}
- /**
- * @dataProvider providerCalculationTypeLEFTNull
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCalculationTypeLEFTNull')]
public function testCalculationTypeNull(string $type, string $resultB1, string $resultB2): void
{
Functions::setCompatibilityMode($type);
@@ -178,9 +169,7 @@ public static function providerCalculationTypeLEFTNull(): array
];
}
- /**
- * @dataProvider providerLeftArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLeftArray')]
public function testLeftArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LenTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LenTest.php
index e2db773ae4..029a510107 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LenTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LenTest.php
@@ -8,9 +8,7 @@
class LenTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerLEN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLEN')]
public function testLEN(mixed $expectedResult, mixed $str = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -30,9 +28,7 @@ public static function providerLEN(): array
return require 'tests/data/Calculation/TextData/LEN.php';
}
- /**
- * @dataProvider providerLenArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLenArray')]
public function testLenArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LowerTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LowerTest.php
index 279332c6f3..e254c07c96 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LowerTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/LowerTest.php
@@ -9,9 +9,7 @@
class LowerTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerLOWER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLOWER')]
public function testLOWER(mixed $expectedResult, mixed $str = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -31,9 +29,7 @@ public static function providerLOWER(): array
return require 'tests/data/Calculation/TextData/LOWER.php';
}
- /**
- * @dataProvider providerLocaleLOWER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLocaleLOWER')]
public function testLowerWithLocaleBoolean(string $expectedResult, string $locale, mixed $value): void
{
$newLocale = Settings::setLocale($locale);
@@ -61,9 +57,7 @@ public static function providerLocaleLOWER(): array
];
}
- /**
- * @dataProvider providerLowerArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLowerArray')]
public function testLowerArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/MidTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/MidTest.php
index 364fb16861..2b36d8cf43 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/MidTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/MidTest.php
@@ -11,12 +11,11 @@
class MidTest extends AllSetupTeardown
{
/**
- * @dataProvider providerMID
- *
* @param mixed $str string from which to extract
* @param mixed $start position at which to start
* @param mixed $cnt number of characters to extract
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMID')]
public function testMID(mixed $expectedResult, mixed $str = 'omitted', mixed $start = 'omitted', mixed $cnt = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -45,9 +44,7 @@ public static function providerMID(): array
return require 'tests/data/Calculation/TextData/MID.php';
}
- /**
- * @dataProvider providerLocaleMID
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLocaleMID')]
public function testMiddleWithLocaleBoolean(string $expectedResult, string $locale, mixed $value, mixed $offset, mixed $characters): void
{
$newLocale = Settings::setLocale($locale);
@@ -78,9 +75,7 @@ public static function providerLocaleMID(): array
];
}
- /**
- * @dataProvider providerCalculationTypeMIDTrue
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCalculationTypeMIDTrue')]
public function testCalculationTypeTrue(string $type, string $resultB1, string $resultB2, string $resultB3): void
{
Functions::setCompatibilityMode($type);
@@ -119,9 +114,7 @@ public static function providerCalculationTypeMIDTrue(): array
];
}
- /**
- * @dataProvider providerCalculationTypeMIDFalse
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCalculationTypeMIDFalse')]
public function testCalculationTypeFalse(string $type, string $resultB1, string $resultB2): void
{
Functions::setCompatibilityMode($type);
@@ -159,9 +152,7 @@ public static function providerCalculationTypeMIDFalse(): array
];
}
- /**
- * @dataProvider providerCalculationTypeMIDNull
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCalculationTypeMIDNull')]
public function testCalculationTypeNull(string $type, string $resultB1, string $resultB2, string $resultB3): void
{
Functions::setCompatibilityMode($type);
@@ -199,9 +190,7 @@ public static function providerCalculationTypeMIDNull(): array
];
}
- /**
- * @dataProvider providerMidArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMidArray')]
public function testMidArray(array $expectedResult, string $argument1, string $argument2, string $argument3): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/NumberValueTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/NumberValueTest.php
index 9dfa1fa205..15afdcd636 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/NumberValueTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/NumberValueTest.php
@@ -10,9 +10,7 @@ class NumberValueTest extends AllSetupTeardown
{
const NV_PRECISION = 1.0E-8;
- /**
- * @dataProvider providerNUMBERVALUE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNUMBERVALUE')]
public function testNUMBERVALUE(mixed $expectedResult, mixed $number = 'omitted', mixed $decimal = 'omitted', mixed $group = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -41,9 +39,7 @@ public static function providerNUMBERVALUE(): array
return require 'tests/data/Calculation/TextData/NUMBERVALUE.php';
}
- /**
- * @dataProvider providerNumberValueArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNumberValueArray')]
public function testNumberValueArray(array $expectedResult, string $argument1, string $argument2, string $argument3): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/OpenOfficeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/OpenOfficeTest.php
index c7af96f64f..5a73568b6e 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/OpenOfficeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/OpenOfficeTest.php
@@ -6,9 +6,7 @@
class OpenOfficeTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerOpenOffice
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOpenOffice')]
public function testOpenOffice(mixed $expectedResult, string $formula): void
{
$this->setOpenOffice();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ProperTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ProperTest.php
index 6df021fe64..3767f91185 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ProperTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ProperTest.php
@@ -9,9 +9,7 @@
class ProperTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerPROPER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPROPER')]
public function testPROPER(mixed $expectedResult, mixed $str = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -31,9 +29,7 @@ public static function providerPROPER(): array
return require 'tests/data/Calculation/TextData/PROPER.php';
}
- /**
- * @dataProvider providerLocaleLOWER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLocaleLOWER')]
public function testLowerWithLocaleBoolean(string $expectedResult, string $locale, mixed $value): void
{
$newLocale = Settings::setLocale($locale);
@@ -61,9 +57,7 @@ public static function providerLocaleLOWER(): array
];
}
- /**
- * @dataProvider providerProperArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerProperArray')]
public function testProperArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReplaceTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReplaceTest.php
index 68a6f501e8..8478bb69bc 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReplaceTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReplaceTest.php
@@ -8,9 +8,7 @@
class ReplaceTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerREPLACE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerREPLACE')]
public function testREPLACE(mixed $expectedResult, mixed $oldText = 'omitted', mixed $start = 'omitted', mixed $count = 'omitted', mixed $newText = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -45,9 +43,7 @@ public static function providerREPLACE(): array
return require 'tests/data/Calculation/TextData/REPLACE.php';
}
- /**
- * @dataProvider providerReplaceArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerReplaceArray')]
public function testReplaceArray(
array $expectedResult,
string $oldText,
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReptTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReptTest.php
index 8cbed14d3d..3a04a346f9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReptTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ReptTest.php
@@ -8,9 +8,7 @@
class ReptTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerREPT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerREPT')]
public function testReptThroughEngine(mixed $expectedResult, mixed $val = 'omitted', mixed $rpt = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -34,9 +32,7 @@ public static function providerREPT(): array
return require 'tests/data/Calculation/TextData/REPT.php';
}
- /**
- * @dataProvider providerReptArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerReptArray')]
public function testReptArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/RightTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/RightTest.php
index 1ecc051fc6..007ad28c25 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/RightTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/RightTest.php
@@ -11,11 +11,10 @@
class RightTest extends AllSetupTeardown
{
/**
- * @dataProvider providerRIGHT
- *
* @param mixed $str string from which to extract
* @param mixed $cnt number of characters to extract
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRIGHT')]
public function testRIGHT(mixed $expectedResult, mixed $str = 'omitted', mixed $cnt = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -39,9 +38,7 @@ public static function providerRIGHT(): array
return require 'tests/data/Calculation/TextData/RIGHT.php';
}
- /**
- * @dataProvider providerLocaleRIGHT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLocaleRIGHT')]
public function testLowerWithLocaleBoolean(string $expectedResult, string $locale, mixed $value, mixed $characters): void
{
$newLocale = Settings::setLocale($locale);
@@ -71,9 +68,7 @@ public static function providerLocaleRIGHT(): array
];
}
- /**
- * @dataProvider providerCalculationTypeRIGHTTrue
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCalculationTypeRIGHTTrue')]
public function testCalculationTypeTrue(string $type, string $resultB1, string $resultB2): void
{
Functions::setCompatibilityMode($type);
@@ -107,9 +102,7 @@ public static function providerCalculationTypeRIGHTTrue(): array
];
}
- /**
- * @dataProvider providerCalculationTypeRIGHTFalse
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCalculationTypeRIGHTFalse')]
public function testCalculationTypeFalse(string $type, string $resultB1, string $resultB2): void
{
Functions::setCompatibilityMode($type);
@@ -143,9 +136,7 @@ public static function providerCalculationTypeRIGHTFalse(): array
];
}
- /**
- * @dataProvider providerCalculationTypeRIGHTNull
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCalculationTypeRIGHTNull')]
public function testCalculationTypeNull(string $type, string $resultB1, string $resultB2): void
{
Functions::setCompatibilityMode($type);
@@ -178,9 +169,7 @@ public static function providerCalculationTypeRIGHTNull(): array
];
}
- /**
- * @dataProvider providerRightArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRightArray')]
public function testRightArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SearchTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SearchTest.php
index 5c441b7dd4..656762cb36 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SearchTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SearchTest.php
@@ -8,9 +8,7 @@
class SearchTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSEARCH
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSEARCH')]
public function testSEARCH(mixed $expectedResult, mixed $findText = 'omitted', mixed $withinText = 'omitted', mixed $start = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -39,9 +37,7 @@ public static function providerSEARCH(): array
return require 'tests/data/Calculation/TextData/SEARCH.php';
}
- /**
- * @dataProvider providerSearchArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchArray')]
public function testSearchArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SubstituteTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SubstituteTest.php
index 9273302527..51bce11af2 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SubstituteTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/SubstituteTest.php
@@ -8,9 +8,7 @@
class SubstituteTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerSUBSTITUTE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSUBSTITUTE')]
public function testSUBSTITUTE(mixed $expectedResult, mixed $text = 'omitted', mixed $oldText = 'omitted', mixed $newText = 'omitted', mixed $instance = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -45,9 +43,7 @@ public static function providerSUBSTITUTE(): array
return require 'tests/data/Calculation/TextData/SUBSTITUTE.php';
}
- /**
- * @dataProvider providerSubstituteArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSubstituteArray')]
public function testSubstituteArray(array $expectedResult, string $oldText, string $fromText, string $toText): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TTest.php
index 6f2bf123a2..46886d5bcf 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TTest.php
@@ -8,9 +8,7 @@
class TTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerT')]
public function testT(mixed $expectedResult, mixed $value = 'no arguments'): void
{
$this->mightHaveException($expectedResult);
@@ -29,9 +27,7 @@ public static function providerT(): array
return require 'tests/data/Calculation/TextData/T.php';
}
- /**
- * @dataProvider providerTArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTArray')]
public function testTArray(array $expectedResult, string $argument): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextAfterTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextAfterTest.php
index 9f50af3ef2..ea3c38f8ec 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextAfterTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextAfterTest.php
@@ -6,9 +6,7 @@
class TextAfterTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTEXTAFTER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTEXTAFTER')]
public function testTextAfter(string $expectedResult, array $arguments): void
{
$text = $arguments[0];
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextBeforeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextBeforeTest.php
index 05f0715ee0..d49457317d 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextBeforeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextBeforeTest.php
@@ -6,9 +6,7 @@
class TextBeforeTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTEXTBEFORE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTEXTBEFORE')]
public function testTextBefore(string $expectedResult, array $arguments): void
{
$text = $arguments[0];
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextJoinTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextJoinTest.php
index e9a231a057..6a23a1550f 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextJoinTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextJoinTest.php
@@ -8,9 +8,7 @@
class TextJoinTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTEXTJOIN
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTEXTJOIN')]
public function testTEXTJOIN(mixed $expectedResult, array $args): void
{
$this->mightHaveException($expectedResult);
@@ -35,9 +33,7 @@ public static function providerTEXTJOIN(): array
return require 'tests/data/Calculation/TextData/TEXTJOIN.php';
}
- /**
- * @dataProvider providerTextjoinArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTextjoinArray')]
public function testTextjoinArray(array $expectedResult, string $delimiter, string $blanks, string $texts): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextSplitTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextSplitTest.php
index 91f90fad84..9ac0c94659 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextSplitTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextSplitTest.php
@@ -26,9 +26,7 @@ private function setDelimiterValues(Worksheet $worksheet, string $column, mixed
}
}
- /**
- * @dataProvider providerTEXTSPLIT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTEXTSPLIT')]
public function testTextSplit(array $expectedResult, array $arguments): void
{
Calculation::getInstance($this->getSpreadsheet())->setInstanceArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextTest.php
index eedd8b93b4..111d8cd9b9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextTest.php
@@ -8,9 +8,7 @@
class TextTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTEXT
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTEXT')]
public function testTEXT(mixed $expectedResult, mixed $value = 'omitted', mixed $format = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -34,9 +32,7 @@ public static function providerTEXT(): array
return require 'tests/data/Calculation/TextData/TEXT.php';
}
- /**
- * @dataProvider providerTextArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTextArray')]
public function testTextArray(array $expectedResult, string $argument1, string $argument2): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TrimTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TrimTest.php
index 30929afd9d..32c10329b4 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TrimTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TrimTest.php
@@ -8,9 +8,7 @@
class TrimTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerTRIM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTRIM')]
public function testTRIM(mixed $expectedResult, mixed $character = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -30,9 +28,7 @@ public static function providerTRIM(): array
return require 'tests/data/Calculation/TextData/TRIM.php';
}
- /**
- * @dataProvider providerTrimArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTrimArray')]
public function testTrimArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UpperTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UpperTest.php
index 7522373da3..9d6b2210e7 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UpperTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/UpperTest.php
@@ -9,9 +9,7 @@
class UpperTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerUPPER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUPPER')]
public function testUPPER(mixed $expectedResult, mixed $str = 'omitted'): void
{
$this->mightHaveException($expectedResult);
@@ -31,9 +29,7 @@ public static function providerUPPER(): array
return require 'tests/data/Calculation/TextData/UPPER.php';
}
- /**
- * @dataProvider providerLocaleLOWER
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLocaleLOWER')]
public function testLowerWithLocaleBoolean(string $expectedResult, string $locale, mixed $value): void
{
$newLocale = Settings::setLocale($locale);
@@ -61,9 +57,7 @@ public static function providerLocaleLOWER(): array
];
}
- /**
- * @dataProvider providerUpperArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUpperArray')]
public function testUpperArray(array $expectedResult, string $array): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueTest.php
index 2df5db47bd..124df52785 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueTest.php
@@ -17,9 +17,7 @@ protected function tearDown(): void
StringHelper::setThousandsSeparator(null);
}
- /**
- * @dataProvider providerVALUE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerVALUE')]
public function testVALUE(mixed $expectedResult, mixed $value = 'omitted'): void
{
StringHelper::setDecimalSeparator('.');
@@ -43,9 +41,7 @@ public static function providerVALUE(): array
return require 'tests/data/Calculation/TextData/VALUE.php';
}
- /**
- * @dataProvider providerValueArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerValueArray')]
public function testValueArray(array $expectedResult, string $argument): void
{
$calculation = Calculation::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueToTextTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueToTextTest.php
index 37c33701e7..337fd03554 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueToTextTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/ValueToTextTest.php
@@ -9,9 +9,7 @@
class ValueToTextTest extends AllSetupTeardown
{
- /**
- * @dataProvider providerVALUE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerVALUE')]
public function testVALUETOTEXT(mixed $expectedResult, mixed $value, int|string $format): void
{
$sheet = $this->getSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Web/UrlEncodeTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Web/UrlEncodeTest.php
index 8ab1337f18..21a3becd2a 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Web/UrlEncodeTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Web/UrlEncodeTest.php
@@ -9,9 +9,7 @@
class UrlEncodeTest extends TestCase
{
- /**
- * @dataProvider providerURLENCODE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerURLENCODE')]
public function testURLENCODE(string $expectedResult, mixed $text): void
{
$result = Service::urlEncode($text);
diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php
index 48c528c6ac..812ad8a055 100644
--- a/tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php
@@ -26,9 +26,7 @@ protected function tearDown(): void
Settings::unsetHttpClient();
}
- /**
- * @dataProvider providerWEBSERVICE
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWEBSERVICE')]
public function testWEBSERVICE(string $expectedResult, string $url, ?array $responseData): void
{
if (!empty($responseData)) {
diff --git a/tests/PhpSpreadsheetTests/Calculation/FunctionsTest.php b/tests/PhpSpreadsheetTests/Calculation/FunctionsTest.php
index 71f400dc2d..f1795b2383 100644
--- a/tests/PhpSpreadsheetTests/Calculation/FunctionsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/FunctionsTest.php
@@ -71,9 +71,7 @@ public function testDUMMY(): void
self::assertEquals('#Not Yet Implemented', $result);
}
- /**
- * @dataProvider providerIfCondition
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIfCondition')]
public function testIfCondition(string $expectedResult, string $args): void
{
$result = Functions::ifCondition($args);
diff --git a/tests/PhpSpreadsheetTests/Calculation/InternalFunctionsTest.php b/tests/PhpSpreadsheetTests/Calculation/InternalFunctionsTest.php
index 093922d13c..0175e7b786 100644
--- a/tests/PhpSpreadsheetTests/Calculation/InternalFunctionsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/InternalFunctionsTest.php
@@ -10,9 +10,7 @@
class InternalFunctionsTest extends TestCase
{
- /**
- * @dataProvider anchorArrayDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('anchorArrayDataProvider')]
public function testAnchorArrayFormula(string $reference, string $range, array $expectedResult): void
{
$spreadsheet = new Spreadsheet();
@@ -51,9 +49,7 @@ public static function anchorArrayDataProvider(): array
];
}
- /**
- * @dataProvider singleDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('singleDataProvider')]
public function testSingleArrayFormula(string $reference, mixed $expectedResult): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/MergedCellTest.php b/tests/PhpSpreadsheetTests/Calculation/MergedCellTest.php
index efaefc9a04..2c8849ece9 100644
--- a/tests/PhpSpreadsheetTests/Calculation/MergedCellTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/MergedCellTest.php
@@ -12,9 +12,7 @@
class MergedCellTest extends TestCase
{
- /**
- * @dataProvider providerWorksheetFormulaeColumns
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWorksheetFormulaeColumns')]
public function testMergedCellColumns(string $formula, mixed $expectedResult): void
{
$spreadSheet = new Spreadsheet();
@@ -52,9 +50,7 @@ public static function providerWorksheetFormulaeColumns(): array
];
}
- /**
- * @dataProvider providerWorksheetFormulaeRows
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerWorksheetFormulaeRows')]
public function testMergedCellRows(string $formula, mixed $expectedResult): void
{
$spreadSheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/MissingArgumentsTest.php b/tests/PhpSpreadsheetTests/Calculation/MissingArgumentsTest.php
index e57d0cd041..c9f994aa02 100644
--- a/tests/PhpSpreadsheetTests/Calculation/MissingArgumentsTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/MissingArgumentsTest.php
@@ -10,9 +10,7 @@
class MissingArgumentsTest extends TestCase
{
- /**
- * @dataProvider providerMissingArguments
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMissingArguments')]
public function testMissingArguments(mixed $expected, string $formula): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/ParseFormulaTest.php b/tests/PhpSpreadsheetTests/Calculation/ParseFormulaTest.php
index 0a8d2105d9..4e06f9ca03 100644
--- a/tests/PhpSpreadsheetTests/Calculation/ParseFormulaTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/ParseFormulaTest.php
@@ -12,9 +12,7 @@
class ParseFormulaTest extends TestCase
{
- /**
- * @dataProvider providerBinaryOperations
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBinaryOperations')]
public function testParseOperations(array $expectedStack, string $formula): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/RefErrorTest.php b/tests/PhpSpreadsheetTests/Calculation/RefErrorTest.php
index 657d79fbb5..3054a3d40c 100644
--- a/tests/PhpSpreadsheetTests/Calculation/RefErrorTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/RefErrorTest.php
@@ -9,9 +9,7 @@
class RefErrorTest extends TestCase
{
- /**
- * @dataProvider providerRefError
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRefError')]
public function testRefError(mixed $expected, string $formula): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/RowColumnReferenceTest.php b/tests/PhpSpreadsheetTests/Calculation/RowColumnReferenceTest.php
index e34f8c87ed..1a1cfa88f3 100644
--- a/tests/PhpSpreadsheetTests/Calculation/RowColumnReferenceTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/RowColumnReferenceTest.php
@@ -35,9 +35,7 @@ protected function setUp(): void
$this->spreadSheet->setActiveSheetIndexByName('summary sheet');
}
- /**
- * @dataProvider providerCurrentWorksheetFormulae
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCurrentWorksheetFormulae')]
public function testCurrentWorksheet(string $formula, float $expectedResult): void
{
$worksheet = $this->spreadSheet->getActiveSheet();
diff --git a/tests/PhpSpreadsheetTests/Calculation/StructuredReferenceFormulaTest.php b/tests/PhpSpreadsheetTests/Calculation/StructuredReferenceFormulaTest.php
index 0c917a658c..8327e03b09 100644
--- a/tests/PhpSpreadsheetTests/Calculation/StructuredReferenceFormulaTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/StructuredReferenceFormulaTest.php
@@ -11,9 +11,7 @@
class StructuredReferenceFormulaTest extends TestCase
{
- /**
- * @dataProvider structuredReferenceProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('structuredReferenceProvider')]
public function testStructuredReferences(float $expectedValue, string $cellAddress): void
{
$inputFileType = 'Xlsx';
diff --git a/tests/PhpSpreadsheetTests/Calculation/TranslationTest.php b/tests/PhpSpreadsheetTests/Calculation/TranslationTest.php
index a3b8460230..e1ab28f290 100644
--- a/tests/PhpSpreadsheetTests/Calculation/TranslationTest.php
+++ b/tests/PhpSpreadsheetTests/Calculation/TranslationTest.php
@@ -33,9 +33,7 @@ protected function tearDown(): void
Settings::setLocale($this->locale);
}
- /**
- * @dataProvider providerTranslations
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTranslations')]
public function testTranslation(string $expectedResult, string $locale, string $formula): void
{
$validLocale = Settings::setLocale($locale);
diff --git a/tests/PhpSpreadsheetTests/Cell/AddressHelperTest.php b/tests/PhpSpreadsheetTests/Cell/AddressHelperTest.php
index 7b41d8bd2d..b823286798 100644
--- a/tests/PhpSpreadsheetTests/Cell/AddressHelperTest.php
+++ b/tests/PhpSpreadsheetTests/Cell/AddressHelperTest.php
@@ -10,9 +10,7 @@
class AddressHelperTest extends TestCase
{
- /**
- * @dataProvider providerR1C1ConversionToA1Absolute
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerR1C1ConversionToA1Absolute')]
public function testR1C1ConversionToA1Absolute(string $expectedValue, string $address): void
{
$actualValue = AddressHelper::convertToA1($address);
@@ -25,9 +23,7 @@ public static function providerR1C1ConversionToA1Absolute(): array
return require 'tests/data/Cell/R1C1ConversionToA1Absolute.php';
}
- /**
- * @dataProvider providerR1C1ConversionToA1Relative
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerR1C1ConversionToA1Relative')]
public function testR1C1ConversionToA1Relative(
string $expectedValue,
string $address,
@@ -54,9 +50,7 @@ public static function providerR1C1ConversionToA1Relative(): array
return require 'tests/data/Cell/R1C1ConversionToA1Relative.php';
}
- /**
- * @dataProvider providerR1C1ConversionToA1Exception
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerR1C1ConversionToA1Exception')]
public function testR1C1ConversionToA1Exception(string $address): void
{
$this->expectException(Exception::class);
@@ -69,9 +63,7 @@ public static function providerR1C1ConversionToA1Exception(): array
return require 'tests/data/Cell/R1C1ConversionToA1Exception.php';
}
- /**
- * @dataProvider providerA1ConversionToR1C1Absolute
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerA1ConversionToR1C1Absolute')]
public function testA1ConversionToR1C1Absolute(string $expectedValue, string $address): void
{
$actualValue = AddressHelper::convertToR1C1($address);
@@ -84,9 +76,7 @@ public static function providerA1ConversionToR1C1Absolute(): array
return require 'tests/data/Cell/A1ConversionToR1C1Absolute.php';
}
- /**
- * @dataProvider providerA1ConversionToR1C1Relative
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerA1ConversionToR1C1Relative')]
public function testA1ConversionToR1C1Relative(string $expectedValue, string $address, ?int $row = null, ?int $column = null): void
{
$actualValue = AddressHelper::convertToR1C1($address, $row, $column);
@@ -99,9 +89,7 @@ public static function providerA1ConversionToR1C1Relative(): array
return require 'tests/data/Cell/A1ConversionToR1C1Relative.php';
}
- /**
- * @dataProvider providerA1ConversionToR1C1Exception
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerA1ConversionToR1C1Exception')]
public function testA1ConversionToR1C1Exception(string $address): void
{
$this->expectException(Exception::class);
@@ -114,9 +102,7 @@ public static function providerA1ConversionToR1C1Exception(): array
return require 'tests/data/Cell/A1ConversionToR1C1Exception.php';
}
- /**
- * @dataProvider providerConvertFormulaToA1FromSpreadsheetXml
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerConvertFormulaToA1FromSpreadsheetXml')]
public function testConvertFormulaToA1SpreadsheetXml(string $expectedValue, string $formula): void
{
$actualValue = AddressHelper::convertFormulaToA1($formula);
@@ -129,9 +115,7 @@ public static function providerConvertFormulaToA1FromSpreadsheetXml(): array
return require 'tests/data/Cell/ConvertFormulaToA1FromSpreadsheetXml.php';
}
- /**
- * @dataProvider providerConvertFormulaToA1FromR1C1Absolute
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerConvertFormulaToA1FromR1C1Absolute')]
public function testConvertFormulaToA1R1C1Absolute(string $expectedValue, string $formula): void
{
$actualValue = AddressHelper::convertFormulaToA1($formula);
@@ -144,9 +128,7 @@ public static function providerConvertFormulaToA1FromR1C1Absolute(): array
return require 'tests/data/Cell/ConvertFormulaToA1FromR1C1Absolute.php';
}
- /**
- * @dataProvider providerConvertFormulaToA1FromR1C1Relative
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerConvertFormulaToA1FromR1C1Relative')]
public function testConvertFormulaToA1FromR1C1Relative(string $expectedValue, string $formula, int $row, int $column): void
{
$actualValue = AddressHelper::convertFormulaToA1($formula, $row, $column);
diff --git a/tests/PhpSpreadsheetTests/Cell/AdvancedValueBinderTest.php b/tests/PhpSpreadsheetTests/Cell/AdvancedValueBinderTest.php
index d8de97a332..bf34a40cad 100644
--- a/tests/PhpSpreadsheetTests/Cell/AdvancedValueBinderTest.php
+++ b/tests/PhpSpreadsheetTests/Cell/AdvancedValueBinderTest.php
@@ -84,9 +84,7 @@ public function testBooleanLocale(): void
$spreadsheet->disconnectWorksheets();
}
- /**
- * @dataProvider currencyProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('currencyProvider')]
public function testCurrency(string $value, float $valueBinded, string $thousandsSeparator, string $decimalSeparator, string $currencyCode): void
{
StringHelper::setCurrencyCode($currencyCode);
@@ -121,9 +119,7 @@ public static function currencyProvider(): array
];
}
- /**
- * @dataProvider fractionProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('fractionProvider')]
public function testFractions(mixed $value, mixed $valueBinded): void
{
$spreadsheet = new Spreadsheet();
@@ -160,9 +156,7 @@ public static function fractionProvider(): array
];
}
- /**
- * @dataProvider percentageProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('percentageProvider')]
public function testPercentages(mixed $value, mixed $valueBinded): void
{
$spreadsheet = new Spreadsheet();
@@ -187,9 +181,7 @@ public static function percentageProvider(): array
];
}
- /**
- * @dataProvider timeProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('timeProvider')]
public function testTimes(mixed $value, mixed $valueBinded): void
{
$spreadsheet = new Spreadsheet();
@@ -212,9 +204,7 @@ public static function timeProvider(): array
];
}
- /**
- * @dataProvider stringProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('stringProvider')]
public function testStringWrapping(string $value): void
{
$spreadsheet = new Spreadsheet();
@@ -234,9 +224,7 @@ public static function stringProvider(): array
];
}
- /**
- * @dataProvider formulaProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('formulaProvider')]
public function testFormula(string $value, string $dataType): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Cell/CellAddressTest.php b/tests/PhpSpreadsheetTests/Cell/CellAddressTest.php
index 3cb204b3f2..e0e030e8eb 100644
--- a/tests/PhpSpreadsheetTests/Cell/CellAddressTest.php
+++ b/tests/PhpSpreadsheetTests/Cell/CellAddressTest.php
@@ -11,9 +11,7 @@
class CellAddressTest extends TestCase
{
- /**
- * @dataProvider providerCreateFromCellAddress
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCreateFromCellAddress')]
public function testCreateFromCellAddress(
string $cellAddress,
string $expectedColumnName,
@@ -38,9 +36,7 @@ public static function providerCreateFromCellAddress(): array
];
}
- /**
- * @dataProvider providerCreateFromCellAddressException
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCreateFromCellAddressException')]
public function testCreateFromCellAddressException(string $cellAddress): void
{
$this->expectException(Exception::class);
@@ -63,9 +59,7 @@ public static function providerCreateFromCellAddressException(): array
];
}
- /**
- * @dataProvider providerCreateFromColumnAndRow
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCreateFromColumnAndRow')]
public function testCreateFromColumnAndRow(
int $columnId,
int $rowId,
@@ -81,9 +75,7 @@ public function testCreateFromColumnAndRow(
self::assertSame($expectedColumnName, $cellAddressObject->columnName());
}
- /**
- * @dataProvider providerCreateFromColumnRowException
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCreateFromColumnRowException')]
public function testCreateFromColumnRowException(int|string $columnId, int|string $rowId): void
{
$this->expectException(Exception::class);
@@ -101,9 +93,7 @@ public static function providerCreateFromColumnAndRow(): array
];
}
- /**
- * @dataProvider providerCreateFromColumnRowArray
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCreateFromColumnRowArray')]
public function testCreateFromColumnRowArray(
int $columnId,
int $rowId,
@@ -129,9 +119,7 @@ public static function providerCreateFromColumnRowArray(): array
];
}
- /**
- * @dataProvider providerCreateFromColumnRowException
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCreateFromColumnRowException')]
public function testCreateFromColumnRowArrayException(mixed $columnId, mixed $rowId): void
{
$this->expectException(Exception::class);
@@ -149,9 +137,7 @@ public static function providerCreateFromColumnRowException(): array
];
}
- /**
- * @dataProvider providerCreateFromCellAddressWithWorksheet
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCreateFromCellAddressWithWorksheet')]
public function testCreateFromCellAddressWithWorksheet(
string $cellAddress,
string $expectedCellAddress,
diff --git a/tests/PhpSpreadsheetTests/Cell/CellDetachTest.php b/tests/PhpSpreadsheetTests/Cell/CellDetachTest.php
index faec5dbd91..db8bea661a 100644
--- a/tests/PhpSpreadsheetTests/Cell/CellDetachTest.php
+++ b/tests/PhpSpreadsheetTests/Cell/CellDetachTest.php
@@ -21,9 +21,7 @@ protected function tearDown(): void
}
}
- /**
- * @dataProvider providerMethodName
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMethodName')]
public function testDetach(string $method): void
{
$this->expectException(SpreadsheetException::class);
@@ -51,9 +49,7 @@ public static function providerMethodName(): array
];
}
- /**
- * @dataProvider providerMethodNameSet
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMethodNameSet')]
public function testDetachSet(string $method): void
{
$this->expectException(SpreadsheetException::class);
diff --git a/tests/PhpSpreadsheetTests/Cell/CellTest.php b/tests/PhpSpreadsheetTests/Cell/CellTest.php
index 0a4308b614..f3539c6075 100644
--- a/tests/PhpSpreadsheetTests/Cell/CellTest.php
+++ b/tests/PhpSpreadsheetTests/Cell/CellTest.php
@@ -76,9 +76,7 @@ public function testSetValueBinderOverride2(): void
$spreadsheet->disconnectWorksheets();
}
- /**
- * @dataProvider providerSetValueExplicit
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueExplicit')]
public function testSetValueExplicit(mixed $expected, mixed $value, string $dataType): void
{
$spreadsheet = new Spreadsheet();
@@ -105,9 +103,7 @@ public function testInvalidIsoDateSetValueExplicit(): void
$cell->setValueExplicit($dateValue, DataType::TYPE_ISO_DATE);
}
- /**
- * @dataProvider providerSetValueExplicitException
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueExplicitException')]
public function testSetValueExplicitException(mixed $value, string $dataType): void
{
$this->expectException(Exception::class);
@@ -250,9 +246,7 @@ public function testAppliedStyleWithRange(): void
$spreadsheet->disconnectWorksheets();
}
- /**
- * @dataProvider appliedStyling
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('appliedStyling')]
public function testAppliedStyleSingleCell(string $cellAddress, string $fillStyle, ?string $fillColor): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Cell/CoordinateTest.php b/tests/PhpSpreadsheetTests/Cell/CoordinateTest.php
index d155928308..35a7fbb823 100644
--- a/tests/PhpSpreadsheetTests/Cell/CoordinateTest.php
+++ b/tests/PhpSpreadsheetTests/Cell/CoordinateTest.php
@@ -11,9 +11,7 @@
class CoordinateTest extends TestCase
{
- /**
- * @dataProvider providerColumnString
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerColumnString')]
public function testColumnIndexFromString(mixed $expectedResult, string $string): void
{
$columnIndex = Coordinate::columnIndexFromString($string);
@@ -58,9 +56,7 @@ public function testColumnIndexFromStringTooShort(): void
self::fail('An expected exception has not been raised.');
}
- /**
- * @dataProvider providerColumnIndex
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerColumnIndex')]
public function testStringFromColumnIndex(mixed $expectedResult, int $columnIndex): void
{
$string = Coordinate::stringFromColumnIndex($columnIndex);
@@ -75,9 +71,7 @@ public static function providerColumnIndex(): array
return require 'tests/data/ColumnIndex.php';
}
- /**
- * @dataProvider providerCoordinates
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCoordinates')]
public function testCoordinateFromString(mixed $expectedResult, string $rangeSet): void
{
$result = Coordinate::coordinateFromString($rangeSet);
@@ -89,9 +83,7 @@ public static function providerCoordinates(): array
return require 'tests/data/CellCoordinates.php';
}
- /**
- * @dataProvider providerIndexesFromString
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIndexesFromString')]
public function testIndexesFromString(array $expectedResult, string $rangeSet): void
{
$result = Coordinate::indexesFromString($rangeSet);
@@ -148,9 +140,7 @@ public function testCoordinateFromStringWithInvalidAddress(): void
self::fail('An expected exception has not been raised.');
}
- /**
- * @dataProvider providerAbsoluteCoordinates
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAbsoluteCoordinates')]
public function testAbsoluteCoordinateFromString(string $expectedResult, string $rangeSet): void
{
$result = Coordinate::absoluteCoordinate($rangeSet);
@@ -177,9 +167,7 @@ public function testAbsoluteCoordinateFromStringWithRangeAddress(): void
self::fail('An expected exception has not been raised.');
}
- /**
- * @dataProvider providerAbsoluteReferences
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAbsoluteReferences')]
public function testAbsoluteReferenceFromString(mixed $expectedResult, int|string $rangeSet): void
{
$result = Coordinate::absoluteReference((string) $rangeSet);
@@ -206,9 +194,7 @@ public function testAbsoluteReferenceFromStringWithRangeAddress(): void
self::fail('An expected exception has not been raised.');
}
- /**
- * @dataProvider providerSplitRange
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSplitRange')]
public function testSplitRange(array $expectedResult, string $rangeSet): void
{
$result = Coordinate::splitRange($rangeSet);
@@ -226,9 +212,7 @@ public static function providerSplitRange(): array
return require 'tests/data/CellSplitRange.php';
}
- /**
- * @dataProvider providerBuildRange
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBuildRange')]
public function testBuildRange(mixed $expectedResult, array $rangeSets): void
{
$result = Coordinate::buildRange($rangeSets);
@@ -258,9 +242,7 @@ public function testBuildRangeInvalid2(): void
Coordinate::buildRange($cellRange);
}
- /**
- * @dataProvider providerRangeBoundaries
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRangeBoundaries')]
public function testRangeBoundaries(mixed $expectedResult, string $rangeSet): void
{
$result = Coordinate::rangeBoundaries($rangeSet);
@@ -272,9 +254,7 @@ public static function providerRangeBoundaries(): array
return require 'tests/data/CellRangeBoundaries.php';
}
- /**
- * @dataProvider providerRangeDimension
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRangeDimension')]
public function testRangeDimension(mixed $expectedResult, string $rangeSet): void
{
$result = Coordinate::rangeDimension($rangeSet);
@@ -286,9 +266,7 @@ public static function providerRangeDimension(): array
return require 'tests/data/CellRangeDimension.php';
}
- /**
- * @dataProvider providerGetRangeBoundaries
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGetRangeBoundaries')]
public function testGetRangeBoundaries(mixed $expectedResult, string $rangeSet): void
{
$result = Coordinate::getRangeBoundaries($rangeSet);
@@ -300,9 +278,7 @@ public static function providerGetRangeBoundaries(): array
return require 'tests/data/CellGetRangeBoundaries.php';
}
- /**
- * @dataProvider providerCoordinateIsInsideRange
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCoordinateIsInsideRange')]
public static function testCoordinateIsInsideRange(bool $expectedResult, string $range, string $coordinate): void
{
$result = Coordinate::coordinateIsInsideRange($range, $coordinate);
@@ -314,9 +290,7 @@ public static function providerCoordinateIsInsideRange(): array
return require 'tests/data/Cell/CoordinateIsInsideRange.php';
}
- /**
- * @dataProvider providerCoordinateIsInsideRangeException
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCoordinateIsInsideRangeException')]
public static function testCoordinateIsInsideRangeException(string $expectedResult, string $range, string $coordinate): void
{
try {
@@ -335,9 +309,7 @@ public static function providerCoordinateIsInsideRangeException(): array
return require 'tests/data/Cell/CoordinateIsInsideRangeException.php';
}
- /**
- * @dataProvider providerExtractAllCellReferencesInRange
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerExtractAllCellReferencesInRange')]
public function testExtractAllCellReferencesInRange(array $expectedResult, string $rangeSet): void
{
$result = Coordinate::extractAllCellReferencesInRange($rangeSet);
@@ -349,9 +321,7 @@ public static function providerExtractAllCellReferencesInRange(): array
return require 'tests/data/CellExtractAllCellReferencesInRange.php';
}
- /**
- * @dataProvider providerInvalidRange
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerInvalidRange')]
public function testExtractAllCellReferencesInRangeInvalidRange(string $range): void
{
$this->expectException(Exception::class);
@@ -365,9 +335,7 @@ public static function providerInvalidRange(): array
return [['Z1:A1'], ['A4:A1'], ['B1:A1'], ['AA1:Z1']];
}
- /**
- * @dataProvider providerMergeRangesInCollection
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMergeRangesInCollection')]
public function testMergeRangesInCollection(mixed $expectedResult, array $rangeSets): void
{
$result = Coordinate::mergeRangesInCollection($rangeSets);
@@ -379,9 +347,7 @@ public static function providerMergeRangesInCollection(): array
return require 'tests/data/CellMergeRangesInCollection.php';
}
- /**
- * @dataProvider providerCoordinateIsRange
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCoordinateIsRange')]
public function testCoordinateIsRange(mixed $expectedResult, string $rangeSet): void
{
$result = Coordinate::coordinateIsRange($rangeSet);
diff --git a/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php b/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php
index 8cb5d8876a..cbb6eaf815 100644
--- a/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php
+++ b/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php
@@ -15,9 +15,7 @@
class DefaultValueBinderTest extends TestCase
{
- /**
- * @dataProvider binderProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('binderProvider')]
public function testBindValue(null|string|bool|int|float|DateTime|DateTimeImmutable $value): void
{
$spreadsheet = new Spreadsheet();
@@ -72,9 +70,7 @@ public function testNonStringableBindValue(): void
$spreadsheet->disconnectWorksheets();
}
- /**
- * @dataProvider providerDataTypeForValue
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDataTypeForValue')]
public function testDataTypeForValue(mixed $expectedResult, mixed $value): void
{
$result = DefaultValueBinder::dataTypeForValue($value);
diff --git a/tests/PhpSpreadsheetTests/Cell/StringValueBinderTest.php b/tests/PhpSpreadsheetTests/Cell/StringValueBinderTest.php
index 71006fff8a..ecd3b4a535 100644
--- a/tests/PhpSpreadsheetTests/Cell/StringValueBinderTest.php
+++ b/tests/PhpSpreadsheetTests/Cell/StringValueBinderTest.php
@@ -28,9 +28,7 @@ protected function tearDown(): void
Cell::setValueBinder($this->valueBinder);
}
- /**
- * @dataProvider providerDataValuesDefault
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDataValuesDefault')]
public function testStringValueBinderDefaultBehaviour(
mixed $value,
mixed $expectedValue,
@@ -98,9 +96,7 @@ public function testNonStringableBindValue(): void
$spreadsheet->disconnectWorksheets();
}
- /**
- * @dataProvider providerDataValuesSuppressNullConversion
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDataValuesSuppressNullConversion')]
public function testStringValueBinderSuppressNullConversion(
mixed $value,
mixed $expectedValue,
@@ -127,9 +123,7 @@ public static function providerDataValuesSuppressNullConversion(): array
];
}
- /**
- * @dataProvider providerDataValuesSuppressBooleanConversion
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDataValuesSuppressBooleanConversion')]
public function testStringValueBinderSuppressBooleanConversion(
mixed $value,
mixed $expectedValue,
@@ -157,9 +151,7 @@ public static function providerDataValuesSuppressBooleanConversion(): array
];
}
- /**
- * @dataProvider providerDataValuesSuppressNumericConversion
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDataValuesSuppressNumericConversion')]
public function testStringValueBinderSuppressNumericConversion(
mixed $value,
mixed $expectedValue,
@@ -194,9 +186,7 @@ public static function providerDataValuesSuppressNumericConversion(): array
];
}
- /**
- * @dataProvider providerDataValuesSuppressFormulaConversion
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDataValuesSuppressFormulaConversion')]
public function testStringValueBinderSuppressFormulaConversion(
mixed $value,
mixed $expectedValue,
@@ -227,9 +217,7 @@ public static function providerDataValuesSuppressFormulaConversion(): array
];
}
- /**
- * @dataProvider providerDataValuesSuppressAllConversion
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDataValuesSuppressAllConversion')]
public function testStringValueBinderSuppressAllConversion(
mixed $value,
mixed $expectedValue,
diff --git a/tests/PhpSpreadsheetTests/CellReferenceHelperTest.php b/tests/PhpSpreadsheetTests/CellReferenceHelperTest.php
index 572ffbff06..d555de4237 100644
--- a/tests/PhpSpreadsheetTests/CellReferenceHelperTest.php
+++ b/tests/PhpSpreadsheetTests/CellReferenceHelperTest.php
@@ -10,9 +10,7 @@
class CellReferenceHelperTest extends TestCase
{
- /**
- * @dataProvider cellReferenceHelperInsertColumnsProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('cellReferenceHelperInsertColumnsProvider')]
public function testCellReferenceHelperInsertColumns(string $expectedResult, string $cellAddress): void
{
$cellReferenceHelper = new CellReferenceHelper('E5', 2, 0);
@@ -56,9 +54,7 @@ public static function cellReferenceHelperInsertColumnsProvider(): array
];
}
- /**
- * @dataProvider cellReferenceHelperDeleteColumnsProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('cellReferenceHelperDeleteColumnsProvider')]
public function testCellReferenceHelperDeleteColumns(string $expectedResult, string $cellAddress): void
{
$cellReferenceHelper = new CellReferenceHelper('E5', -2, 0);
@@ -92,9 +88,7 @@ public static function cellReferenceHelperDeleteColumnsProvider(): array
];
}
- /**
- * @dataProvider cellReferenceHelperInsertRowsProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('cellReferenceHelperInsertRowsProvider')]
public function testCellReferenceHelperInsertRows(string $expectedResult, string $cellAddress): void
{
$cellReferenceHelper = new CellReferenceHelper('E5', 0, 2);
@@ -124,9 +118,7 @@ public static function cellReferenceHelperInsertRowsProvider(): array
];
}
- /**
- * @dataProvider cellReferenceHelperDeleteRowsProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('cellReferenceHelperDeleteRowsProvider')]
public function testCellReferenceHelperDeleteRows(string $expectedResult, string $cellAddress): void
{
$cellReferenceHelper = new CellReferenceHelper('E5', 0, -2);
@@ -152,9 +144,7 @@ public static function cellReferenceHelperDeleteRowsProvider(): array
];
}
- /**
- * @dataProvider cellReferenceHelperInsertColumnsAbsoluteProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('cellReferenceHelperInsertColumnsAbsoluteProvider')]
public function testCellReferenceHelperInsertColumnsAbsolute(string $expectedResult, string $cellAddress): void
{
$cellReferenceHelper = new CellReferenceHelper('E5', 2, 0);
@@ -180,9 +170,7 @@ public static function cellReferenceHelperInsertColumnsAbsoluteProvider(): array
];
}
- /**
- * @dataProvider cellReferenceHelperDeleteColumnsAbsoluteProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('cellReferenceHelperDeleteColumnsAbsoluteProvider')]
public function testCellReferenceHelperDeleteColumnsAbsolute(string $expectedResult, string $cellAddress): void
{
$cellReferenceHelper = new CellReferenceHelper('E5', -2, 0);
@@ -208,9 +196,7 @@ public static function cellReferenceHelperDeleteColumnsAbsoluteProvider(): array
];
}
- /**
- * @dataProvider cellReferenceHelperInsertRowsAbsoluteProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('cellReferenceHelperInsertRowsAbsoluteProvider')]
public function testCellReferenceHelperInsertRowsAbsolute(string $expectedResult, string $cellAddress): void
{
$cellReferenceHelper = new CellReferenceHelper('E5', 0, 2);
@@ -236,9 +222,7 @@ public static function cellReferenceHelperInsertRowsAbsoluteProvider(): array
];
}
- /**
- * @dataProvider cellReferenceHelperDeleteRowsAbsoluteProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('cellReferenceHelperDeleteRowsAbsoluteProvider')]
public function testCellReferenceHelperDeleteRowsAbsolute(string $expectedResult, string $cellAddress): void
{
$cellReferenceHelper = new CellReferenceHelper('E5', 0, -2);
diff --git a/tests/PhpSpreadsheetTests/Chart/Charts32CatAxValAxTest.php b/tests/PhpSpreadsheetTests/Chart/Charts32CatAxValAxTest.php
index 0937345cd0..cbc235e76d 100644
--- a/tests/PhpSpreadsheetTests/Chart/Charts32CatAxValAxTest.php
+++ b/tests/PhpSpreadsheetTests/Chart/Charts32CatAxValAxTest.php
@@ -34,9 +34,7 @@ protected function tearDown(): void
}
}
- /**
- * @dataProvider providerCatAxValAx
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCatAxValAx')]
public function test1CatAx1ValAx(?bool $numeric): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Chart/Charts32XmlTest.php b/tests/PhpSpreadsheetTests/Chart/Charts32XmlTest.php
index d6b6564a0a..282c9588b2 100644
--- a/tests/PhpSpreadsheetTests/Chart/Charts32XmlTest.php
+++ b/tests/PhpSpreadsheetTests/Chart/Charts32XmlTest.php
@@ -14,9 +14,7 @@ class Charts32XmlTest extends TestCase
// These tests can only be performed by examining xml.
private const DIRECTORY = 'samples' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;
- /**
- * @dataProvider providerScatterCharts
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerScatterCharts')]
public function testBezierCount(int $expectedCount, string $inputFile): void
{
$file = self::DIRECTORY . $inputFile;
@@ -71,9 +69,7 @@ public function testAreaPercentageNoCat(): void
self::assertSame(0, substr_count($data, ''));
}
- /**
- * @dataProvider providerCatAxValAx
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCatAxValAx')]
public function testCatAxValAx(?bool $numeric): void
{
$file = self::DIRECTORY . '32readwriteScatterChart1.xlsx';
diff --git a/tests/PhpSpreadsheetTests/Chart/Issue562Test.php b/tests/PhpSpreadsheetTests/Chart/Issue562Test.php
index 21bb903fa6..ce9d6c5c5c 100644
--- a/tests/PhpSpreadsheetTests/Chart/Issue562Test.php
+++ b/tests/PhpSpreadsheetTests/Chart/Issue562Test.php
@@ -29,9 +29,7 @@ public function writeCharts(XlsxWriter $writer): void
$writer->setIncludeCharts(true);
}
- /**
- * @dataProvider providerNoBorder
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNoBorder')]
public function testNoBorder(?bool $noBorder, bool $expectedResult): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/DefinedNameFormulaTest.php b/tests/PhpSpreadsheetTests/DefinedNameFormulaTest.php
index 131163def6..4117c4745e 100644
--- a/tests/PhpSpreadsheetTests/DefinedNameFormulaTest.php
+++ b/tests/PhpSpreadsheetTests/DefinedNameFormulaTest.php
@@ -11,9 +11,7 @@
class DefinedNameFormulaTest extends TestCase
{
- /**
- * @dataProvider providerRangeOrFormula
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRangeOrFormula')]
public function testRangeOrFormula(string $value, bool $expectedResult): void
{
$actualResult = DefinedName::testIfFormula($value);
diff --git a/tests/PhpSpreadsheetTests/Document/EpochTest.php b/tests/PhpSpreadsheetTests/Document/EpochTest.php
index feb98c8af9..9947b2918c 100644
--- a/tests/PhpSpreadsheetTests/Document/EpochTest.php
+++ b/tests/PhpSpreadsheetTests/Document/EpochTest.php
@@ -25,9 +25,7 @@ public static function providerFormats(): array
];
}
- /**
- * @dataProvider providerFormats
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testSetCreated(string $format, string $timestamp): void
{
$spreadsheet = new Spreadsheet();
@@ -77,9 +75,7 @@ public static function providerFormats2(): array
];
}
- /**
- * @dataProvider providerFormats2
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats2')]
public function testConsistentTimeStamp(string $format): void
{
$pgmstart = (float) (new DateTime())->format('U');
diff --git a/tests/PhpSpreadsheetTests/Document/PropertiesTest.php b/tests/PhpSpreadsheetTests/Document/PropertiesTest.php
index 7d491d25e6..1b32aeaec9 100644
--- a/tests/PhpSpreadsheetTests/Document/PropertiesTest.php
+++ b/tests/PhpSpreadsheetTests/Document/PropertiesTest.php
@@ -44,9 +44,7 @@ public function testSetCreator(): void
self::assertSame($creator, $this->properties->getCreator());
}
- /**
- * @dataProvider providerCreationTime
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCreationTime')]
public function testSetCreated(null|int $expectedCreationTime, null|int|string $created): void
{
$expectedCreationTime = $expectedCreationTime ?? $this->startTime;
@@ -73,9 +71,7 @@ public function testSetModifier(): void
self::assertSame($creator, $this->properties->getLastModifiedBy());
}
- /**
- * @dataProvider providerModifiedTime
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerModifiedTime')]
public function testSetModified(mixed $expectedModifiedTime, null|int|string $modified): void
{
$expectedModifiedTime = $expectedModifiedTime ?? $this->startTime;
@@ -150,9 +146,7 @@ public function testSetManager(): void
self::assertSame($manager, $this->properties->getManager());
}
- /**
- * @dataProvider providerCustomProperties
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCustomProperties')]
public function testSetCustomProperties(mixed $expectedType, mixed $expectedValue, string $propertyName, null|bool|float|int|string $propertyValue, ?string $propertyType = null): void
{
if ($propertyType === null) {
diff --git a/tests/PhpSpreadsheetTests/Document/SecurityTest.php b/tests/PhpSpreadsheetTests/Document/SecurityTest.php
index 015e32ba29..75cf5106f9 100644
--- a/tests/PhpSpreadsheetTests/Document/SecurityTest.php
+++ b/tests/PhpSpreadsheetTests/Document/SecurityTest.php
@@ -54,9 +54,7 @@ public static function providerLocks(): array
];
}
- /**
- * @dataProvider providerLocks
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLocks')]
public function testLocks(bool $revision, bool $windows, bool $structure): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php b/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php
index a14e2c5acc..1ce621f749 100644
--- a/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php
+++ b/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php
@@ -18,18 +18,14 @@ class DocumentGeneratorTest extends TestCase
private static bool $succeededByCategory = false;
- /**
- * @dataProvider providerGenerateFunctionListByName
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGenerateFunctionListByName')]
public function testGenerateFunctionListByName(array $phpSpreadsheetFunctions, string $expected): void
{
self::assertEquals($expected, DocumentGenerator::generateFunctionListByName($phpSpreadsheetFunctions));
self::$succeededByName = true;
}
- /**
- * @dataProvider providerGenerateFunctionListByCategory
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGenerateFunctionListByCategory')]
public function testGenerateFunctionListByCategory(array $phpSpreadsheetFunctions, string $expected): void
{
self::assertEquals($expected, DocumentGenerator::generateFunctionListByCategory($phpSpreadsheetFunctions));
diff --git a/tests/PhpSpreadsheetTests/Functional/ActiveSheetTest.php b/tests/PhpSpreadsheetTests/Functional/ActiveSheetTest.php
index a6e1b33ffb..c6a2d43d21 100644
--- a/tests/PhpSpreadsheetTests/Functional/ActiveSheetTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/ActiveSheetTest.php
@@ -18,9 +18,8 @@ public static function providerFormats(): array
/**
* Test load file with correct active sheet.
- *
- * @dataProvider providerFormats
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testActiveSheet(string $format): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Functional/ColumnWidthTest.php b/tests/PhpSpreadsheetTests/Functional/ColumnWidthTest.php
index fa6e958f25..0f7e5f7e4a 100644
--- a/tests/PhpSpreadsheetTests/Functional/ColumnWidthTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/ColumnWidthTest.php
@@ -16,9 +16,7 @@ public static function providerFormats(): array
];
}
- /**
- * @dataProvider providerFormats
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testReadColumnWidth(string $format): void
{
// create new sheet with column width
diff --git a/tests/PhpSpreadsheetTests/Functional/CommentsTest.php b/tests/PhpSpreadsheetTests/Functional/CommentsTest.php
index 36ec29b974..c92f1c4e1d 100644
--- a/tests/PhpSpreadsheetTests/Functional/CommentsTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/CommentsTest.php
@@ -21,9 +21,8 @@ public static function providerFormats(): array
/**
* Test load file with comment in sheet to load proper
* count of comments in correct coords.
- *
- * @dataProvider providerFormats
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testComments(string $format): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Functional/ConditionalStopIfTrueTest.php b/tests/PhpSpreadsheetTests/Functional/ConditionalStopIfTrueTest.php
index b886c9e061..7c091c2f7e 100644
--- a/tests/PhpSpreadsheetTests/Functional/ConditionalStopIfTrueTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/ConditionalStopIfTrueTest.php
@@ -18,9 +18,7 @@ public static function providerFormats(): array
];
}
- /**
- * @dataProvider providerFormats
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testConditionalStopIfTrue(string $format): void
{
$pCoordinate = 'A1:A3';
diff --git a/tests/PhpSpreadsheetTests/Functional/EnclosureTest.php b/tests/PhpSpreadsheetTests/Functional/EnclosureTest.php
index c1b7671922..bf58132af9 100644
--- a/tests/PhpSpreadsheetTests/Functional/EnclosureTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/EnclosureTest.php
@@ -19,9 +19,7 @@ public static function providerFormats(): array
];
}
- /**
- * @dataProvider providerFormats
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testEnclosure(string $format): void
{
$value = '';
diff --git a/tests/PhpSpreadsheetTests/Functional/FreezePaneTest.php b/tests/PhpSpreadsheetTests/Functional/FreezePaneTest.php
index 28b05b2d73..88dd4606b1 100644
--- a/tests/PhpSpreadsheetTests/Functional/FreezePaneTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/FreezePaneTest.php
@@ -19,9 +19,7 @@ public static function providerFormats(): array
];
}
- /**
- * @dataProvider providerFormats
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testFreezePane(string $format): void
{
$cellSplit = 'B4';
@@ -43,9 +41,7 @@ public function testFreezePane(string $format): void
$reloadedSpreadsheet->disconnectWorksheets();
}
- /**
- * @dataProvider providerFormats
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testFreezePaneWithInvalidSelectedCells(string $format): void
{
$cellSplit = 'A7';
@@ -71,9 +67,7 @@ public function testFreezePaneWithInvalidSelectedCells(string $format): void
$reloadedSpreadsheet->disconnectWorksheets();
}
- /**
- * @dataProvider providerFormats
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testFreezePaneUserSelectedCell(string $format): void
{
$spreadsheet = new Spreadsheet();
@@ -115,9 +109,7 @@ public function testFreezePaneUserSelectedCell(string $format): void
$reloadedSpreadsheet->disconnectWorksheets();
}
- /**
- * @dataProvider providerFormats
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testNoFreezePaneUserSelectedCell(string $format): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Functional/MergedCellsTest.php b/tests/PhpSpreadsheetTests/Functional/MergedCellsTest.php
index c99826bfd6..b6e8b10bf9 100644
--- a/tests/PhpSpreadsheetTests/Functional/MergedCellsTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/MergedCellsTest.php
@@ -18,9 +18,7 @@ public static function providerFormats(): array
];
}
- /**
- * @dataProvider providerFormats
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testMergedCells(string $format): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Functional/PrintAreaTest.php b/tests/PhpSpreadsheetTests/Functional/PrintAreaTest.php
index 535f927feb..2918341eba 100644
--- a/tests/PhpSpreadsheetTests/Functional/PrintAreaTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/PrintAreaTest.php
@@ -17,9 +17,7 @@ public static function providerFormats(): array
];
}
- /**
- * @dataProvider providerFormats
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testPageSetup(string $format): void
{
// Create new workbook with 6 sheets and different print areas
diff --git a/tests/PhpSpreadsheetTests/Functional/ReadBlankCellsTest.php b/tests/PhpSpreadsheetTests/Functional/ReadBlankCellsTest.php
index be00dd3927..b44c43f318 100644
--- a/tests/PhpSpreadsheetTests/Functional/ReadBlankCellsTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/ReadBlankCellsTest.php
@@ -50,9 +50,8 @@ public function testLoadDontReadEmptyCells(): void
/**
* Test generate file with some empty cells.
- *
- * @dataProvider providerSheetFormat
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSheetFormat')]
public function testLoadAndSaveReadEmpty(string $format, bool $expected): void
{
$filename = 'tests/data/Reader/XLSX/blankcell.xlsx';
@@ -72,9 +71,8 @@ public function testLoadAndSaveReadEmpty(string $format, bool $expected): void
/**
* Test generate file with some empty cells.
- *
- * @dataProvider providerSheetFormat
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSheetFormat')]
public function testLoadAndSaveDontReadEmpty(string $format): void
{
$filename = 'tests/data/Reader/XLSX/blankcell.xlsx';
diff --git a/tests/PhpSpreadsheetTests/Functional/ReadFilterTest.php b/tests/PhpSpreadsheetTests/Functional/ReadFilterTest.php
index 7b352dde27..9b4920d846 100644
--- a/tests/PhpSpreadsheetTests/Functional/ReadFilterTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/ReadFilterTest.php
@@ -33,9 +33,8 @@ public static function providerCellsValues(): array
/**
* Test load Xlsx file with many empty cells with no filter used.
- *
- * @dataProvider providerCellsValues
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCellsValues')]
public function testXlsxLoadWithoutReadFilter(string $format, array $arrayData): void
{
$spreadsheet = new Spreadsheet();
@@ -58,9 +57,8 @@ public function testXlsxLoadWithoutReadFilter(string $format, array $arrayData):
/**
* Test load Xlsx file with many empty cells (and big max row number) with readfilter.
- *
- * @dataProvider providerCellsValues
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCellsValues')]
public function testXlsxLoadWithReadFilter(string $format, array $arrayData): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Functional/SelectedCellsTest.php b/tests/PhpSpreadsheetTests/Functional/SelectedCellsTest.php
index 89a7327e58..90f806b02f 100644
--- a/tests/PhpSpreadsheetTests/Functional/SelectedCellsTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/SelectedCellsTest.php
@@ -17,9 +17,8 @@ public static function providerFormats(): array
/**
* Test load file with correct selected cells.
- *
- * @dataProvider providerFormats
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testSelectedCells(string $format): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Functional/StreamTest.php b/tests/PhpSpreadsheetTests/Functional/StreamTest.php
index c67c1ab22c..4a43f77c5f 100644
--- a/tests/PhpSpreadsheetTests/Functional/StreamTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/StreamTest.php
@@ -11,9 +11,8 @@
/**
* Not clear that Dompdf will be Php8.4 compatible in time.
* Run in separate process and add version test till it is ready.
- *
- * @runTestsInSeparateProcesses
*/
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
class StreamTest extends TestCase
{
public static function providerFormats(): array
@@ -32,9 +31,7 @@ public static function providerFormats(): array
return $providerFormats;
}
- /**
- * @dataProvider providerFormats
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testAllWritersCanWriteToStream(string $format): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Functional/TypeAttributePreservationTest.php b/tests/PhpSpreadsheetTests/Functional/TypeAttributePreservationTest.php
index e90cf42677..20aecf94bb 100644
--- a/tests/PhpSpreadsheetTests/Functional/TypeAttributePreservationTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/TypeAttributePreservationTest.php
@@ -31,9 +31,8 @@ public static function providerFormulae(): array
/**
* Ensure saved spreadsheets maintain the correct data type.
- *
- * @dataProvider providerFormulae
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormulae')]
public function testFormulae(string $format, array $values): void
{
$spreadsheet = new Spreadsheet();
@@ -63,9 +62,8 @@ public static function customizeWriter(WriterXlsx $writer): void
/**
* Ensure saved spreadsheets maintain the correct data type.
- *
- * @dataProvider providerFormulae
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormulae')]
public function testFormulaeNoPrecalc(string $format, array $values): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Functional/WorkbookViewAttributesTest.php b/tests/PhpSpreadsheetTests/Functional/WorkbookViewAttributesTest.php
index 5c21443a95..fee6dbbe8f 100644
--- a/tests/PhpSpreadsheetTests/Functional/WorkbookViewAttributesTest.php
+++ b/tests/PhpSpreadsheetTests/Functional/WorkbookViewAttributesTest.php
@@ -21,9 +21,8 @@ public static function providerFormats(): array
* are preserved when xlsx documents are read and written.
*
* @see https://github.com/PHPOffice/PhpSpreadsheet/issues/523
- *
- * @dataProvider providerFormats
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormats')]
public function testPreserveWorkbookViewAttributes(string $format): void
{
// Create a dummy workbook with two worksheets
diff --git a/tests/PhpSpreadsheetTests/Helper/DimensionTest.php b/tests/PhpSpreadsheetTests/Helper/DimensionTest.php
index e6a823c763..46ea88a162 100644
--- a/tests/PhpSpreadsheetTests/Helper/DimensionTest.php
+++ b/tests/PhpSpreadsheetTests/Helper/DimensionTest.php
@@ -10,18 +10,14 @@
class DimensionTest extends TestCase
{
- /**
- * @dataProvider providerCellWidth
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCellWidth')]
public function testCreateDimension(float $expectedResult, string $dimension): void
{
$result = (new Dimension($dimension))->width();
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerConvertUoM
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerConvertUoM')]
public function testConvertDimension(float $expectedResult, string $dimension, string $unitOfMeasure): void
{
$result = (new Dimension($dimension))->toUnit($unitOfMeasure);
diff --git a/tests/PhpSpreadsheetTests/Helper/HtmlTest.php b/tests/PhpSpreadsheetTests/Helper/HtmlTest.php
index 26f22847a1..6779fb9b5d 100644
--- a/tests/PhpSpreadsheetTests/Helper/HtmlTest.php
+++ b/tests/PhpSpreadsheetTests/Helper/HtmlTest.php
@@ -10,9 +10,7 @@
class HtmlTest extends TestCase
{
- /**
- * @dataProvider providerUtf8EncodingSupport
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerUtf8EncodingSupport')]
public function testUtf8EncodingSupport(string $expected, string $input): void
{
$html = new Html();
diff --git a/tests/PhpSpreadsheetTests/Helper/SampleCoverageTest.php b/tests/PhpSpreadsheetTests/Helper/SampleCoverageTest.php
index 2c54dd68fc..52fe5c0da7 100644
--- a/tests/PhpSpreadsheetTests/Helper/SampleCoverageTest.php
+++ b/tests/PhpSpreadsheetTests/Helper/SampleCoverageTest.php
@@ -8,9 +8,7 @@
use PHPUnit\Framework\TestCase;
use RuntimeException;
-/**
- * @covers \PhpOffice\PhpSpreadsheet\Helper\Sample
- */
+#[\PHPUnit\Framework\Attributes\CoversClass(Sample::class)]
class SampleCoverageTest extends TestCase
{
public function testSample(): void
diff --git a/tests/PhpSpreadsheetTests/Helper/SampleTest.php b/tests/PhpSpreadsheetTests/Helper/SampleTest.php
index f20c2163c7..e8c79bed41 100644
--- a/tests/PhpSpreadsheetTests/Helper/SampleTest.php
+++ b/tests/PhpSpreadsheetTests/Helper/SampleTest.php
@@ -9,13 +9,9 @@
class SampleTest extends TestCase
{
- /**
- * @runInSeparateProcess
- *
- * @preserveGlobalState disabled
- *
- * @dataProvider providerSample
- */
+ #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
+ #[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerSample')]
public function testSample(string $sample): void
{
ob_start();
diff --git a/tests/PhpSpreadsheetTests/IOFactoryTest.php b/tests/PhpSpreadsheetTests/IOFactoryTest.php
index 90628fbeeb..86244e7de5 100644
--- a/tests/PhpSpreadsheetTests/IOFactoryTest.php
+++ b/tests/PhpSpreadsheetTests/IOFactoryTest.php
@@ -13,9 +13,7 @@
class IOFactoryTest extends TestCase
{
- /**
- * @dataProvider providerCreateWriter
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCreateWriter')]
public function testCreateWriter(string $name, string $expected): void
{
$spreadsheet = new Spreadsheet();
@@ -45,9 +43,7 @@ public function testRegisterWriter(): void
self::assertInstanceOf(Writer\Pdf\Mpdf::class, $actual);
}
- /**
- * @dataProvider providerCreateReader
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCreateReader')]
public function testCreateReader(string $name, string $expected): void
{
$actual = IOFactory::createReader($name);
@@ -75,9 +71,7 @@ public function testRegisterReader(): void
self::assertInstanceOf(Reader\Html::class, $actual);
}
- /**
- * @dataProvider providerIdentify
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIdentify')]
public function testIdentifyCreateLoad(string $file, string $expectedName, string $expectedClass): void
{
$actual = IOFactory::identify($file);
diff --git a/tests/PhpSpreadsheetTests/NamedRange2Test.php b/tests/PhpSpreadsheetTests/NamedRange2Test.php
index 9061d6e1e0..04b3e0031c 100644
--- a/tests/PhpSpreadsheetTests/NamedRange2Test.php
+++ b/tests/PhpSpreadsheetTests/NamedRange2Test.php
@@ -90,9 +90,7 @@ public function testNamedRangeSetStyle(): void
self::assertSame('lightDown', $sheet->getStyle('E3')->getFill()->getFillType());
}
- /**
- * @dataProvider providerRangeOrFormula
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRangeOrFormula')]
public function testNamedRangeSetStyleBad(string $exceptionMessage, string $name): void
{
$this->expectException(Except::class);
diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvEncodingTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvEncodingTest.php
index 7ce3c5f4ff..3e4ce79abb 100644
--- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvEncodingTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvEncodingTest.php
@@ -9,9 +9,7 @@
class CsvEncodingTest extends TestCase
{
- /**
- * @dataProvider providerEncodings
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEncodings')]
public function testEncodings(string $filename, string $encoding): void
{
$reader = new Csv();
@@ -21,9 +19,7 @@ public function testEncodings(string $filename, string $encoding): void
self::assertEquals('Ã…', $sheet->getCell('A1')->getValue());
}
- /**
- * @dataProvider providerEncodings
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEncodings')]
public function testWorkSheetInfo(string $filename, string $encoding): void
{
$reader = new Csv();
@@ -51,9 +47,7 @@ public static function providerEncodings(): array
];
}
- /**
- * @dataProvider providerGuessEncoding
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGuessEncoding')]
public function testGuessEncoding(string $filename): void
{
$reader = new Csv();
@@ -86,9 +80,7 @@ public function testSurrogate(): void
self::assertEquals('�', $sheet->getCell('C3')->getValue());
}
- /**
- * @dataProvider providerGuessEncoding
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerGuessEncoding')]
public function testFallbackEncoding(string $filename): void
{
$reader = new Csv();
diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2232Test.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2232Test.php
index 191aa9d84b..05f69fb4bc 100644
--- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2232Test.php
+++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2232Test.php
@@ -29,9 +29,7 @@ protected function tearDown(): void
Settings::setLocale($this->locale);
}
- /**
- * @dataProvider providerIssue2232
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIssue2232')]
public function testBooleanConversions(bool $useStringBinder, ?bool $preserveBoolString, bool|string $b2Value, bool|string $b3Value): void
{
if ($useStringBinder) {
@@ -62,9 +60,7 @@ public static function providerIssue2232(): array
];
}
- /**
- * @dataProvider providerIssue2232locale
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIssue2232locale')]
public function testBooleanConversionsLocaleAware(bool $useStringBinder, ?bool $preserveBoolString, mixed $b2Value, mixed $b3Value, mixed $b4Value, mixed $b5Value): void
{
if ($useStringBinder) {
diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvLineEndingTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvLineEndingTest.php
index 28ff9f30fe..9ff77268a7 100644
--- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvLineEndingTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvLineEndingTest.php
@@ -20,9 +20,7 @@ protected function tearDown(): void
}
}
- /**
- * @dataProvider providerEndings
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEndings')]
public function testEndings(string $ending): void
{
if ($ending === "\r" && PHP_VERSION_ID >= 90000) {
@@ -40,9 +38,7 @@ public function testEndings(string $ending): void
$spreadsheet->disconnectWorksheets();
}
- /**
- * @dataProvider providerEndings
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEndings')]
public function testEndingsNoDetect(string $ending): void
{
$this->tempFile = $filename = File::temporaryFilename();
diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatLocaleTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatLocaleTest.php
index f6bd4e9cb9..513576b19b 100644
--- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatLocaleTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatLocaleTest.php
@@ -44,11 +44,8 @@ protected function tearDown(): void
}
}
- /**
- * @dataProvider providerNumberFormatNoConversionTest
- *
- * @runInSeparateProcess
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNumberFormatNoConversionTest')]
+ #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
public function testNumberFormatNoConversion(mixed $expectedValue, string $expectedFormat, string $cellAddress): void
{
if (!$this->localeAdjusted) {
@@ -88,11 +85,8 @@ public static function providerNumberFormatNoConversionTest(): array
];
}
- /**
- * @dataProvider providerNumberValueConversionTest
- *
- * @runInSeparateProcess
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNumberValueConversionTest')]
+ #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
public function testNumberValueConversion(mixed $expectedValue, string $cellAddress): void
{
if (!$this->localeAdjusted) {
diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatTest.php
index 5b3e7a0626..d80cfc44ea 100644
--- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatTest.php
@@ -20,9 +20,7 @@ protected function setUp(): void
$this->csvReader = new Csv();
}
- /**
- * @dataProvider providerNumberFormatNoConversionTest
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNumberFormatNoConversionTest')]
public function testNumberFormatNoConversion(int|string $expectedValue, string $expectedFormat, string $cellAddress): void
{
$spreadsheet = $this->csvReader->load($this->filename);
@@ -55,9 +53,7 @@ public static function providerNumberFormatNoConversionTest(): array
];
}
- /**
- * @dataProvider providerNumberValueConversionTest
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNumberValueConversionTest')]
public function testNumberValueConversion(mixed $expectedValue, string $cellAddress): void
{
$this->csvReader->castFormattedNumberToNumeric(true);
@@ -104,9 +100,7 @@ public static function providerNumberValueConversionTest(): array
];
}
- /**
- * @dataProvider providerNumberFormatConversionTest
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerNumberFormatConversionTest')]
public function testNumberFormatConversion(mixed $expectedValue, string $expectedFormat, string $cellAddress): void
{
$this->csvReader->castFormattedNumberToNumeric(true, true);
diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php
index e3da06bcc4..a142cb7340 100644
--- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php
@@ -10,9 +10,7 @@
class CsvTest extends TestCase
{
- /**
- * @dataProvider providerDelimiterDetection
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDelimiterDetection')]
public function testDelimiterDetection(string $filename, string $expectedDelimiter, string $cell, string|float|int|null $expectedValue): void
{
$reader = new Csv();
@@ -87,9 +85,7 @@ public static function providerDelimiterDetection(): array
];
}
- /**
- * @dataProvider providerCanLoad
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCanLoad')]
public function testCanLoad(bool $expected, string $filename): void
{
$reader = new Csv();
@@ -229,9 +225,7 @@ public function testReadNonexistentFileName(): void
$reader->load('tests/data/Reader/CSV/encoding.utf8.csvxxx');
}
- /**
- * @dataProvider providerEscapes
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerEscapes')]
public function testInferSeparator(string $escape, string $delimiter): void
{
if (PHP_VERSION_ID >= 90000 && $escape !== '') {
diff --git a/tests/PhpSpreadsheetTests/Reader/Gnumeric/ArrayFormula2Test.php b/tests/PhpSpreadsheetTests/Reader/Gnumeric/ArrayFormula2Test.php
index 6ea143565f..bf45461c8f 100644
--- a/tests/PhpSpreadsheetTests/Reader/Gnumeric/ArrayFormula2Test.php
+++ b/tests/PhpSpreadsheetTests/Reader/Gnumeric/ArrayFormula2Test.php
@@ -9,9 +9,7 @@
class ArrayFormula2Test extends TestCase
{
- /**
- * @dataProvider arrayFormulaReaderProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('arrayFormulaReaderProvider')]
public function testArrayFormulaReader(
string $cellAddress,
string $expectedRange,
diff --git a/tests/PhpSpreadsheetTests/Reader/Gnumeric/ArrayFormulaTest.php b/tests/PhpSpreadsheetTests/Reader/Gnumeric/ArrayFormulaTest.php
index f0e9599cc7..2943ebead2 100644
--- a/tests/PhpSpreadsheetTests/Reader/Gnumeric/ArrayFormulaTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Gnumeric/ArrayFormulaTest.php
@@ -9,9 +9,7 @@
class ArrayFormulaTest extends TestCase
{
- /**
- * @dataProvider arrayFormulaReaderProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('arrayFormulaReaderProvider')]
public function testArrayFormulaReader(
string $cellAddress,
string $expectedRange,
diff --git a/tests/PhpSpreadsheetTests/Reader/Gnumeric/GnumericStylesTest.php b/tests/PhpSpreadsheetTests/Reader/Gnumeric/GnumericStylesTest.php
index e8d332895d..dfb046f512 100644
--- a/tests/PhpSpreadsheetTests/Reader/Gnumeric/GnumericStylesTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Gnumeric/GnumericStylesTest.php
@@ -14,9 +14,7 @@
class GnumericStylesTest extends TestCase
{
- /**
- * @dataProvider providerBorderStyle
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBorderStyle')]
public function testBorderStyle(string $style, string $expectedResult): void
{
$styles = Gnumeric::gnumericMappings();
@@ -41,9 +39,7 @@ public function testBorderStyleCoverage(): void
}
}
- /**
- * @dataProvider providerfillType
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerfillType')]
public function testFillType(string $style, string $expectedResult): void
{
$styles = Gnumeric::gnumericMappings();
@@ -68,9 +64,7 @@ public function testFillTypeCoverage(): void
}
}
- /**
- * @dataProvider providerHorizontal
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHorizontal')]
public function testHorizontal(string $style, string $expectedResult): void
{
$styles = Gnumeric::gnumericMappings();
@@ -95,9 +89,7 @@ public function testHorizontalCoverage(): void
}
}
- /**
- * @dataProvider providerunderline
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerunderline')]
public function testUnderline(string $style, string $expectedResult): void
{
$styles = Gnumeric::gnumericMappings();
@@ -122,9 +114,7 @@ public function testUnderlineCoverage(): void
}
}
- /**
- * @dataProvider providerVertical
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerVertical')]
public function testVertical(string $style, string $expectedResult): void
{
$styles = Gnumeric::gnumericMappings();
@@ -149,9 +139,7 @@ public function testVerticalCoverage(): void
}
}
- /**
- * @dataProvider providerDataType
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDataType')]
public function testDataType(string $style, string $expectedResult): void
{
$styles = Gnumeric::gnumericMappings();
diff --git a/tests/PhpSpreadsheetTests/Reader/Gnumeric/PageSetupTest.php b/tests/PhpSpreadsheetTests/Reader/Gnumeric/PageSetupTest.php
index 16a4708109..80002f3c72 100644
--- a/tests/PhpSpreadsheetTests/Reader/Gnumeric/PageSetupTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Gnumeric/PageSetupTest.php
@@ -20,9 +20,7 @@ public static function fileProvider(): array
];
}
- /**
- * @dataProvider fileProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('fileProvider')]
public function testPageSetup(string $filename): void
{
$reader = new Gnumeric();
@@ -51,9 +49,7 @@ public function testPageSetup(string $filename): void
$spreadsheet->disconnectWorksheets();
}
- /**
- * @dataProvider fileProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('fileProvider')]
public function testPageMargins(string $filename): void
{
$reader = new Gnumeric();
diff --git a/tests/PhpSpreadsheetTests/Reader/Html/HtmlBorderTest.php b/tests/PhpSpreadsheetTests/Reader/Html/HtmlBorderTest.php
index a525b321a5..b516de04cd 100644
--- a/tests/PhpSpreadsheetTests/Reader/Html/HtmlBorderTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Html/HtmlBorderTest.php
@@ -78,9 +78,7 @@ public function testCanApplyInlineBordersStyles(): void
self::assertEquals('333333', $border->getColor()->getRGB());
}
- /**
- * @dataProvider providerBorderStyle
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBorderStyle')]
public function testBorderStyle(string $style, string $expectedResult): void
{
$borders = Html::getBorderMappings();
diff --git a/tests/PhpSpreadsheetTests/Reader/Html/HtmlCharsetTest.php b/tests/PhpSpreadsheetTests/Reader/Html/HtmlCharsetTest.php
index 1daacaf62b..f4c0193f21 100644
--- a/tests/PhpSpreadsheetTests/Reader/Html/HtmlCharsetTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Html/HtmlCharsetTest.php
@@ -10,9 +10,7 @@
class HtmlCharsetTest extends TestCase
{
- /**
- * @dataProvider providerCharset
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCharset')]
public function testCharset(string $filename, string $expectedResult): void
{
if ($expectedResult === 'exception') {
diff --git a/tests/PhpSpreadsheetTests/Reader/Html/HtmlLibxmlTest.php b/tests/PhpSpreadsheetTests/Reader/Html/HtmlLibxmlTest.php
index bb29eb6c55..5df5c249b1 100644
--- a/tests/PhpSpreadsheetTests/Reader/Html/HtmlLibxmlTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Html/HtmlLibxmlTest.php
@@ -14,9 +14,8 @@
* set_error_handler to detect if there has been a problem.
* I want it run in a separate
* process because I am nervous about libxml_use_internal_errors.
- *
- * @runTestsInSeparateProcesses
*/
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
class HtmlLibxmlTest extends TestCase
{
private bool $useErrors;
diff --git a/tests/PhpSpreadsheetTests/Reader/Html/HtmlPhpunit10Test.php b/tests/PhpSpreadsheetTests/Reader/Html/HtmlPhpunit10Test.php
index 175f0e8bb5..d691a40ced 100644
--- a/tests/PhpSpreadsheetTests/Reader/Html/HtmlPhpunit10Test.php
+++ b/tests/PhpSpreadsheetTests/Reader/Html/HtmlPhpunit10Test.php
@@ -11,9 +11,8 @@
* There were problems running this test in HtmlTest with PhpUnit 10.
* This replacement seem to work. I want it run in a separate
* process because I am nervous about set_error_handler.
- *
- * @runTestsInSeparateProcesses
*/
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
class HtmlPhpunit10Test extends TestCase
{
private static string $errorString;
diff --git a/tests/PhpSpreadsheetTests/Reader/Html/HtmlTest.php b/tests/PhpSpreadsheetTests/Reader/Html/HtmlTest.php
index afb01cbfef..8d23411443 100644
--- a/tests/PhpSpreadsheetTests/Reader/Html/HtmlTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Html/HtmlTest.php
@@ -64,9 +64,7 @@ public static function providerCanReadVerySmallFile(): array
];
}
- /**
- * @dataProvider providerCanReadVerySmallFile
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCanReadVerySmallFile')]
public function testCanReadVerySmallFile(bool $expected, string $content): void
{
$filename = HtmlHelper::createHtml($content);
diff --git a/tests/PhpSpreadsheetTests/Reader/Ods/ArrayFormulaTest.php b/tests/PhpSpreadsheetTests/Reader/Ods/ArrayFormulaTest.php
index 726b42ba3f..9accf01ae3 100644
--- a/tests/PhpSpreadsheetTests/Reader/Ods/ArrayFormulaTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Ods/ArrayFormulaTest.php
@@ -9,9 +9,7 @@
class ArrayFormulaTest extends TestCase
{
- /**
- * @dataProvider arrayFormulaReaderProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('arrayFormulaReaderProvider')]
public function testArrayFormulaReader(
string $cellAddress,
string $expectedRange,
diff --git a/tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php b/tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php
index 9299161f0e..fa099ef76c 100644
--- a/tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php
@@ -13,9 +13,7 @@
class XmlScannerTest extends TestCase
{
- /**
- * @dataProvider providerValidXML
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerValidXML')]
public function testValidXML(string $filename, string $expectedResult): void
{
$reader = XmlScanner::getInstance(new \PhpOffice\PhpSpreadsheet\Reader\Xml());
@@ -41,9 +39,7 @@ public static function providerValidXML(): array
return $tests;
}
- /**
- * @dataProvider providerInvalidXML
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerInvalidXML')]
public function testInvalidXML(string $filename): void
{
$this->expectException(ReaderException::class);
@@ -94,9 +90,7 @@ public function testGetSecurityScannerForNonXmlBasedReader2(): void
$fileReader->getSecurityScannerOrThrow();
}
- /**
- * @dataProvider providerValidXMLForCallback
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerValidXMLForCallback')]
public function testSecurityScanWithCallback(string $filename, string $expectedResult): void
{
$fileReader = new Xlsx();
@@ -136,9 +130,7 @@ public function testEncodingAllowsMixedCase(): void
self::assertSame($input, $output);
}
- /**
- * @dataProvider providerInvalidXlsx
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerInvalidXlsx')]
public function testInvalidXlsx(string $filename, string $message): void
{
$this->expectException(ReaderException::class);
@@ -160,9 +152,7 @@ public static function providerInvalidXlsx(): array
];
}
- /**
- * @dataProvider providerValidUtf16
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerValidUtf16')]
public function testValidUtf16(string $filename): void
{
$reader = new Xlsx();
diff --git a/tests/PhpSpreadsheetTests/Reader/Xls/ColorMapTest.php b/tests/PhpSpreadsheetTests/Reader/Xls/ColorMapTest.php
index ee571b9568..45787c75fe 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xls/ColorMapTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xls/ColorMapTest.php
@@ -11,9 +11,7 @@
class ColorMapTest extends TestCase
{
- /**
- * @dataProvider colorMapProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('colorMapProvider')]
public function testColorMap(int $index, string $expectedBiff5, string $expectedBiff8, string $expectedBuiltin): void
{
self::assertSame($expectedBiff5, BIFF5::lookup($index)['rgb']);
diff --git a/tests/PhpSpreadsheetTests/Reader/Xls/ConditionalFormattingBasicTest.php b/tests/PhpSpreadsheetTests/Reader/Xls/ConditionalFormattingBasicTest.php
index 684c3d2630..ee39c7ce2d 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xls/ConditionalFormattingBasicTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xls/ConditionalFormattingBasicTest.php
@@ -11,9 +11,7 @@
class ConditionalFormattingBasicTest extends TestCase
{
- /**
- * @dataProvider conditionalFormattingProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('conditionalFormattingProvider')]
public function testReadConditionalFormatting(string $expectedRange, array $expectedRules): void
{
$filename = 'tests/data/Reader/XLS/CF_Basic_Comparisons.xls';
diff --git a/tests/PhpSpreadsheetTests/Reader/Xls/ConditionalFormattingExpressionTest.php b/tests/PhpSpreadsheetTests/Reader/Xls/ConditionalFormattingExpressionTest.php
index abdfb90884..eb7a679161 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xls/ConditionalFormattingExpressionTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xls/ConditionalFormattingExpressionTest.php
@@ -10,9 +10,7 @@
class ConditionalFormattingExpressionTest extends TestCase
{
- /**
- * @dataProvider conditionalFormattingProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('conditionalFormattingProvider')]
public function testReadConditionalFormatting(string $expectedRange, array $expectedRule): void
{
$filename = 'tests/data/Reader/XLS/CF_Expression_Comparisons.xls';
diff --git a/tests/PhpSpreadsheetTests/Reader/Xls/DataValidationTest.php b/tests/PhpSpreadsheetTests/Reader/Xls/DataValidationTest.php
index 80619af997..3d30e8ab63 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xls/DataValidationTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xls/DataValidationTest.php
@@ -10,9 +10,7 @@
class DataValidationTest extends TestCase
{
- /**
- * @dataProvider dataValidationProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataValidationProvider')]
public function testDataValidation(string $expectedRange, array $expectedRule): void
{
$filename = 'tests/data/Reader/XLS/DataValidation.xls';
diff --git a/tests/PhpSpreadsheetTests/Reader/Xls/ErrorCodeMapTest.php b/tests/PhpSpreadsheetTests/Reader/Xls/ErrorCodeMapTest.php
index c853d50208..170a38a1ec 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xls/ErrorCodeMapTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xls/ErrorCodeMapTest.php
@@ -9,9 +9,7 @@
class ErrorCodeMapTest extends TestCase
{
- /**
- * @dataProvider errorCodeMapProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('errorCodeMapProvider')]
public function testErrorCode(bool|string $expected, int $index): void
{
self::assertSame($expected, ErrorCode::lookup($index));
diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/AutoFilterTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/AutoFilterTest.php
index f064ec9f3d..653a76cd7d 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xlsx/AutoFilterTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/AutoFilterTest.php
@@ -30,9 +30,7 @@ public static function loadDataProvider(): array
];
}
- /**
- * @dataProvider loadDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('loadDataProvider')]
public function testLoad(string $ref, int $expectedReadAutoFilterCalled, string $expectedRef): void
{
$worksheetAutoFilter = $this->getMockBuilder(WorksheetAutoFilter::class)
diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/DataValidationTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/DataValidationTest.php
index 3de53c7c7e..4935511cbb 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xlsx/DataValidationTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/DataValidationTest.php
@@ -25,9 +25,8 @@ public function testLoadXlsxDataValidation(): void
/**
* Test for load drop down lists of another sheet.
* Pull #2150, issue #2149. Also issue #2677.
- *
- * @dataProvider providerExternalSheet
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerExternalSheet')]
public function testDataValidationOfAnotherSheet(string $expectedB14, string $filename): void
{
$reader = new Xlsx();
diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/DirectorySeparatorTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/DirectorySeparatorTest.php
index e90d599a10..c2d8b31529 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xlsx/DirectorySeparatorTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/DirectorySeparatorTest.php
@@ -10,9 +10,7 @@
class DirectorySeparatorTest extends TestCase
{
- /**
- * @dataProvider providerDirectorySeparator
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDirectorySeparator')]
public function testDirectorySeparatorIdentify(string $fileName): void
{
$filename = "tests/data/Reader/XLSX/{$fileName}";
@@ -21,9 +19,7 @@ public function testDirectorySeparatorIdentify(string $fileName): void
self::assertSame('Xlsx', $reader);
}
- /**
- * @dataProvider providerDirectorySeparator
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDirectorySeparator')]
public function testDirectorySeparatorWorksheetNames(string $fileName): void
{
$filename = "tests/data/Reader/XLSX/{$fileName}";
@@ -34,9 +30,7 @@ public function testDirectorySeparatorWorksheetNames(string $fileName): void
self::assertSame('Sheet', $sheetList[0]);
}
- /**
- * @dataProvider providerDirectorySeparator
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDirectorySeparator')]
public function testDirectorySeparatorWorksheetInfo(string $fileName): void
{
$filename = "tests/data/Reader/XLSX/{$fileName}";
@@ -49,9 +43,7 @@ public function testDirectorySeparatorWorksheetInfo(string $fileName): void
self::assertSame(21, (int) $sheetData[0]['totalColumns']);
}
- /**
- * @dataProvider providerDirectorySeparator
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDirectorySeparator')]
public function testDirectorySeparatorLoad(string $fileName): void
{
$filename = "tests/data/Reader/XLSX/{$fileName}";
diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/GridlinesTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/GridlinesTest.php
index 5387ea738c..1d0003f0c1 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xlsx/GridlinesTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/GridlinesTest.php
@@ -9,9 +9,7 @@
class GridlinesTest extends AbstractFunctional
{
- /**
- * @dataProvider loadDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('loadDataProvider')]
public function testGridlines(bool $display, bool $print): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/XlsxTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/XlsxTest.php
index 344f0666a2..3b5bbb193b 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xlsx/XlsxTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/XlsxTest.php
@@ -234,9 +234,8 @@ public function testLoadSaveWithEmptyDrawings(): void
/**
* Test if all whitespace is removed from a style definition string.
* This is needed to parse it into properties with the correct keys.
- *
- * @dataProvider providerStripsWhiteSpaceFromStyleString
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerStripsWhiteSpaceFromStyleString')]
public function testStripsWhiteSpaceFromStyleString(string $string): void
{
$string = Xlsx::stripWhiteSpaceFromStyleString($string);
diff --git a/tests/PhpSpreadsheetTests/Reader/Xml/XmlStyleCoverageTest.php b/tests/PhpSpreadsheetTests/Reader/Xml/XmlStyleCoverageTest.php
index 73c3d1d53a..1aa95cfd12 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xml/XmlStyleCoverageTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xml/XmlStyleCoverageTest.php
@@ -11,9 +11,7 @@
class XmlStyleCoverageTest extends TestCase
{
- /**
- * @dataProvider providerBorderStyle
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerBorderStyle')]
public function testBorderStyle(string $style, string $expectedResult): void
{
$styles = Xml::XmlMappings();
@@ -38,9 +36,7 @@ public function testBorderStyleCoverage(): void
}
}
- /**
- * @dataProvider providerfillType
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerfillType')]
public function testFillType(string $style, string $expectedResult): void
{
$styles = Xml::xmlMappings();
diff --git a/tests/PhpSpreadsheetTests/Reader/Xml/XmlTest.php b/tests/PhpSpreadsheetTests/Reader/Xml/XmlTest.php
index a308b068d6..63ec368dfa 100644
--- a/tests/PhpSpreadsheetTests/Reader/Xml/XmlTest.php
+++ b/tests/PhpSpreadsheetTests/Reader/Xml/XmlTest.php
@@ -11,9 +11,7 @@
class XmlTest extends TestCase
{
- /**
- * @dataProvider providerInvalidSimpleXML
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerInvalidSimpleXML')]
public function testInvalidSimpleXML(string $filename): void
{
$xmlReader = new Xml();
diff --git a/tests/PhpSpreadsheetTests/RefRangeTest.php b/tests/PhpSpreadsheetTests/RefRangeTest.php
index 17b4e3cd67..7cf3d08e8d 100644
--- a/tests/PhpSpreadsheetTests/RefRangeTest.php
+++ b/tests/PhpSpreadsheetTests/RefRangeTest.php
@@ -10,9 +10,7 @@
class RefRangeTest extends TestCase
{
- /**
- * @dataProvider providerRefRange
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRefRange')]
public function testRefRange(int|string $expectedResult, string $rangeString): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/ReferenceHelper4Test.php b/tests/PhpSpreadsheetTests/ReferenceHelper4Test.php
index c0dc756115..920acf8611 100644
--- a/tests/PhpSpreadsheetTests/ReferenceHelper4Test.php
+++ b/tests/PhpSpreadsheetTests/ReferenceHelper4Test.php
@@ -9,9 +9,7 @@
class ReferenceHelper4Test extends TestCase
{
- /**
- * @dataProvider dataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')]
public function testIssue3907(string $expectedResult, string $settingsTitle, string $formula, string $dataTitle = 'DATA'): void
{
$spreadsheet = new Spreadsheet();
diff --git a/tests/PhpSpreadsheetTests/ReferenceHelperTest.php b/tests/PhpSpreadsheetTests/ReferenceHelperTest.php
index a28477ca17..a768da97da 100644
--- a/tests/PhpSpreadsheetTests/ReferenceHelperTest.php
+++ b/tests/PhpSpreadsheetTests/ReferenceHelperTest.php
@@ -102,9 +102,7 @@ public function testCellReverseSort(): void
}
}
- /**
- * @dataProvider providerFormulaUpdates
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFormulaUpdates')]
public function testUpdateFormula(string $formula, int $insertRows, int $insertColumns, string $worksheet, string $expectedResult): void
{
$referenceHelper = ReferenceHelper::getInstance();
@@ -119,9 +117,7 @@ public static function providerFormulaUpdates(): array
return require 'tests/data/ReferenceHelperFormulaUpdates.php';
}
- /**
- * @dataProvider providerMultipleWorksheetFormulaUpdates
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMultipleWorksheetFormulaUpdates')]
public function testUpdateFormulaForMultipleWorksheets(string $formula, int $insertRows, int $insertColumns, string $expectedResult): void
{
$referenceHelper = ReferenceHelper::getInstance();
diff --git a/tests/PhpSpreadsheetTests/Shared/CodePageTest.php b/tests/PhpSpreadsheetTests/Shared/CodePageTest.php
index e7c021835e..448bff3e98 100644
--- a/tests/PhpSpreadsheetTests/Shared/CodePageTest.php
+++ b/tests/PhpSpreadsheetTests/Shared/CodePageTest.php
@@ -11,10 +11,9 @@
class CodePageTest extends TestCase
{
/**
- * @dataProvider providerCodePage
- *
* @param string|string[] $expectedResult
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCodePage')]
public function testCodePageNumberToName(array|string $expectedResult, int $codePageIndex): void
{
if ($expectedResult === 'exception') {
diff --git a/tests/PhpSpreadsheetTests/Shared/Date2Test.php b/tests/PhpSpreadsheetTests/Shared/Date2Test.php
index f5e51728fc..c109e02790 100644
--- a/tests/PhpSpreadsheetTests/Shared/Date2Test.php
+++ b/tests/PhpSpreadsheetTests/Shared/Date2Test.php
@@ -37,9 +37,7 @@ public function testInvalidType(): void
Cell::setCalculateDateTimeType(-1);
}
- /**
- * @dataProvider providerTimeOnly
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerTimeOnly')]
public function testTimeOnly(int|float $expectedResult, int|float|string $value, ?string $format = null): void
{
Cell::setCalculateDateTimeType(Cell::CALCULATE_TIME_FLOAT);
@@ -82,9 +80,7 @@ public static function providerTimeOnly(): array
];
}
- /**
- * @dataProvider providerDateAndTime
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateAndTime')]
public function testDateAndTime(int|float $expectedResult, int|float|string $value, ?string $format = null): void
{
Cell::setCalculateDateTimeType(Cell::CALCULATE_DATE_TIME_FLOAT);
@@ -127,9 +123,7 @@ public static function providerDateAndTime(): array
];
}
- /**
- * @dataProvider providerAsis
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAsis')]
public function testDefault(int|float $expectedResult, int|float|string $value, ?string $format = null): void
{
//Cell::setCalculateDateTimeType(Cell::CALCULATE_DATE_TIME_ASIS);
@@ -149,9 +143,7 @@ public function testDefault(int|float $expectedResult, int|float|string $value,
self::assertSame(1, $this->spreadsheet->getActiveSheetIndex());
}
- /**
- * @dataProvider providerAsis
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerAsis')]
public function testAsis(int|float $expectedResult, int|float|string $value, ?string $format = null): void
{
Cell::setCalculateDateTimeType(Cell::CALCULATE_DATE_TIME_ASIS);
diff --git a/tests/PhpSpreadsheetTests/Shared/DateTest.php b/tests/PhpSpreadsheetTests/Shared/DateTest.php
index c770ac260e..e3dbedb6b2 100644
--- a/tests/PhpSpreadsheetTests/Shared/DateTest.php
+++ b/tests/PhpSpreadsheetTests/Shared/DateTest.php
@@ -51,9 +51,7 @@ public function testSetExcelCalendarWithInvalidValue(): void
self::assertFalse($result);
}
- /**
- * @dataProvider providerDateTimeExcelToTimestamp1900
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeExcelToTimestamp1900')]
public function testDateTimeExcelToTimestamp1900(float|int $expectedResult, float|int $excelDateTimeValue): void
{
if ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN) {
@@ -70,9 +68,7 @@ public static function providerDateTimeExcelToTimestamp1900(): array
return require 'tests/data/Shared/Date/ExcelToTimestamp1900.php';
}
- /**
- * @dataProvider providerDateTimeTimestampToExcel1900
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeTimestampToExcel1900')]
public function testDateTimeTimestampToExcel1900(float|int $expectedResult, float|int|string $unixTimestamp): void
{
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
@@ -86,9 +82,7 @@ public static function providerDateTimeTimestampToExcel1900(): array
return require 'tests/data/Shared/Date/TimestampToExcel1900.php';
}
- /**
- * @dataProvider providerDateTimeDateTimeToExcel
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeDateTimeToExcel')]
public function testDateTimeDateTimeToExcel(float|int $expectedResult, DateTimeInterface $dateTimeObject): void
{
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
@@ -103,10 +97,9 @@ public static function providerDateTimeDateTimeToExcel(): array
}
/**
- * @dataProvider providerDateTimeFormattedPHPToExcel1900
- *
* @param array{0: int, 1: int, 2: int, 3: int, 4: int, 5: float|int} $args Array containing year/month/day/hours/minutes/seconds
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeFormattedPHPToExcel1900')]
public function testDateTimeFormattedPHPToExcel1900(mixed $expectedResult, ...$args): void
{
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
@@ -120,9 +113,7 @@ public static function providerDateTimeFormattedPHPToExcel1900(): array
return require 'tests/data/Shared/Date/FormattedPHPToExcel1900.php';
}
- /**
- * @dataProvider providerDateTimeExcelToTimestamp1904
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeExcelToTimestamp1904')]
public function testDateTimeExcelToTimestamp1904(float|int $expectedResult, float|int $excelDateTimeValue): void
{
if ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN) {
@@ -139,9 +130,7 @@ public static function providerDateTimeExcelToTimestamp1904(): array
return require 'tests/data/Shared/Date/ExcelToTimestamp1904.php';
}
- /**
- * @dataProvider providerDateTimeTimestampToExcel1904
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeTimestampToExcel1904')]
public function testDateTimeTimestampToExcel1904(mixed $expectedResult, float|int|string $unixTimestamp): void
{
Date::setExcelCalendar(Date::CALENDAR_MAC_1904);
@@ -155,9 +144,7 @@ public static function providerDateTimeTimestampToExcel1904(): array
return require 'tests/data/Shared/Date/TimestampToExcel1904.php';
}
- /**
- * @dataProvider providerIsDateTimeFormatCode
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerIsDateTimeFormatCode')]
public function testIsDateTimeFormatCode(mixed $expectedResult, string $format): void
{
$result = Date::isDateTimeFormatCode($format);
@@ -169,9 +156,7 @@ public static function providerIsDateTimeFormatCode(): array
return require 'tests/data/Shared/Date/FormatCodes.php';
}
- /**
- * @dataProvider providerDateTimeExcelToTimestamp1900Timezone
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDateTimeExcelToTimestamp1900Timezone')]
public function testDateTimeExcelToTimestamp1900Timezone(float|int $expectedResult, float|int $excelDateTimeValue, string $timezone): void
{
if (is_numeric($expectedResult) && ($expectedResult > PHP_INT_MAX || $expectedResult < PHP_INT_MIN)) {
diff --git a/tests/PhpSpreadsheetTests/Shared/DrawingTest.php b/tests/PhpSpreadsheetTests/Shared/DrawingTest.php
index 972576e605..7eb41e643e 100644
--- a/tests/PhpSpreadsheetTests/Shared/DrawingTest.php
+++ b/tests/PhpSpreadsheetTests/Shared/DrawingTest.php
@@ -10,9 +10,7 @@
class DrawingTest extends TestCase
{
- /**
- * @dataProvider providerPixelsToCellDimension
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPixelsToCellDimension')]
public function testPixelsToCellDimension(
float $expectedResult,
int $pixelSize,
@@ -27,9 +25,7 @@ public function testPixelsToCellDimension(
self::assertSame($expectedResult, $result);
}
- /**
- * @dataProvider providerCellDimensionToPixels
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCellDimensionToPixels')]
public function testCellDimensionToPixels(
int $expectedResult,
int $cellSize,
diff --git a/tests/PhpSpreadsheetTests/Shared/ExactFontTest.php b/tests/PhpSpreadsheetTests/Shared/ExactFontTest.php
index c5a3aa0d88..fcae3303ba 100644
--- a/tests/PhpSpreadsheetTests/Shared/ExactFontTest.php
+++ b/tests/PhpSpreadsheetTests/Shared/ExactFontTest.php
@@ -82,7 +82,7 @@ protected function tearDown(): void
$this->directoryName = '';
}
- /** @dataProvider providerFontData */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFontData')]
public function testExact(string $fontName, float $excelWidth, float $xmlWidth, float $winWidth, float $ubuntuWidth): void
{
if ($this->incompleteMessage !== '') {
diff --git a/tests/PhpSpreadsheetTests/Shared/Font2Test.php b/tests/PhpSpreadsheetTests/Shared/Font2Test.php
index 2bfa429ef9..e35ae3e3ba 100644
--- a/tests/PhpSpreadsheetTests/Shared/Font2Test.php
+++ b/tests/PhpSpreadsheetTests/Shared/Font2Test.php
@@ -10,9 +10,7 @@
class Font2Test extends TestCase
{
- /**
- * @dataProvider providerCharsetFromFontName
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCharsetFromFontName')]
public function testCharsetFromFontName(string $fontName, int $expectedResult): void
{
$result = Font::getCharsetFromFontName($fontName);
diff --git a/tests/PhpSpreadsheetTests/Shared/FontFileNameTest.php b/tests/PhpSpreadsheetTests/Shared/FontFileNameTest.php
index 5d45d720b2..d953245ece 100644
--- a/tests/PhpSpreadsheetTests/Shared/FontFileNameTest.php
+++ b/tests/PhpSpreadsheetTests/Shared/FontFileNameTest.php
@@ -39,9 +39,7 @@ protected function tearDown(): void
Font::setExtraFontArray($this->holdExtraFontArray);
}
- /**
- * @dataProvider providerDefault
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerDefault')]
public function testDefaultFilenames(string $expected, array $fontArray): void
{
if ($expected === 'exception') {
@@ -81,9 +79,7 @@ public static function providerDefault(): array
];
}
- /**
- * @dataProvider providerMac
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerMac')]
public function testMacFilenames(string $expected, array $fontArray): void
{
if ($expected === 'exception') {
@@ -123,9 +119,7 @@ public static function providerMac(): array
];
}
- /**
- * @dataProvider providerOverride
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOverride')]
public function testOverrideFilenames(string $expected, array $fontArray): void
{
Font::setTrueTypeFontPath(self::DEFAULT_DIRECTORY);
@@ -153,9 +147,7 @@ public static function providerOverride(): array
];
}
- /**
- * @dataProvider providerOverrideAbsolute
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerOverrideAbsolute')]
public function testOverrideFilenamesAbsolute(string $expected, array $fontArray): void
{
$realPath = realpath(self::MAC_DIRECTORY) . DIRECTORY_SEPARATOR;
@@ -184,9 +176,7 @@ public static function providerOverrideAbsolute(): array
];
}
- /**
- * @dataProvider providerRecurse
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerRecurse')]
public function testRecurseFilenames(string $expected, array $fontArray): void
{
if ($expected === 'exception') {
diff --git a/tests/PhpSpreadsheetTests/Shared/FontTest.php b/tests/PhpSpreadsheetTests/Shared/FontTest.php
index e9b1a2ed89..c59cc33159 100644
--- a/tests/PhpSpreadsheetTests/Shared/FontTest.php
+++ b/tests/PhpSpreadsheetTests/Shared/FontTest.php
@@ -41,9 +41,7 @@ public function testSetAutoSizeMethodWithInvalidValue(): void
self::assertFalse($result);
}
- /**
- * @dataProvider providerFontSizeToPixels
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerFontSizeToPixels')]
public function testFontSizeToPixels(float|int $expectedResult, float|int $size): void
{
$result = Font::fontSizeToPixels($size);
@@ -55,9 +53,7 @@ public static function providerFontSizeToPixels(): array
return require 'tests/data/Shared/FontSizeToPixels.php';
}
- /**
- * @dataProvider providerInchSizeToPixels
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerInchSizeToPixels')]
public function testInchSizeToPixels(float|int $expectedResult, float|int $size): void
{
$result = Font::inchSizeToPixels($size);
@@ -69,9 +65,7 @@ public static function providerInchSizeToPixels(): array
return require 'tests/data/Shared/InchSizeToPixels.php';
}
- /**
- * @dataProvider providerCentimeterSizeToPixels
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCentimeterSizeToPixels')]
public function testCentimeterSizeToPixels(float $expectedResult, float $size): void
{
$result = Font::centimeterSizeToPixels($size);
@@ -95,9 +89,7 @@ public function testVerdanaRotation(): void
self::assertEquals(4, $width);
}
- /**
- * @dataProvider providerCalculateApproximateColumnWidth
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerCalculateApproximateColumnWidth')]
public function testCalculateApproximateColumnWidth(
float $expectedWidth,
StyleFont $font,
diff --git a/tests/PhpSpreadsheetTests/Shared/OLEPhpunit10Test.php b/tests/PhpSpreadsheetTests/Shared/OLEPhpunit10Test.php
index 7b97a979d2..22505530d0 100644
--- a/tests/PhpSpreadsheetTests/Shared/OLEPhpunit10Test.php
+++ b/tests/PhpSpreadsheetTests/Shared/OLEPhpunit10Test.php
@@ -11,9 +11,8 @@
* There were problems running these tests in OLETest with PhpUnit 10.
* These replacements seem to work. I want them run in separate
* processes because I am nervous about set_error_handler.
- *
- * @runTestsInSeparateProcesses
*/
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
class OLEPhpunit10Test extends TestCase
{
private static string $errorString;
diff --git a/tests/PhpSpreadsheetTests/Shared/PasswordHasherTest.php b/tests/PhpSpreadsheetTests/Shared/PasswordHasherTest.php
index 78a89386c1..e22a8e86b2 100644
--- a/tests/PhpSpreadsheetTests/Shared/PasswordHasherTest.php
+++ b/tests/PhpSpreadsheetTests/Shared/PasswordHasherTest.php
@@ -10,9 +10,7 @@
class PasswordHasherTest extends TestCase
{
- /**
- * @dataProvider providerHashPassword
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerHashPassword')]
public function testHashPassword(
string $expectedResult,
string $password,
diff --git a/tests/PhpSpreadsheetTests/Shared/PasswordReloadTest.php b/tests/PhpSpreadsheetTests/Shared/PasswordReloadTest.php
index 50b5b1f93c..965d003000 100644
--- a/tests/PhpSpreadsheetTests/Shared/PasswordReloadTest.php
+++ b/tests/PhpSpreadsheetTests/Shared/PasswordReloadTest.php
@@ -10,9 +10,7 @@
class PasswordReloadTest extends AbstractFunctional
{
- /**
- * @dataProvider providerPasswords
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerPasswords')]
public function testPasswordReload(string $format, string $algorithm, bool $supported = true): void
{
$password = 'hello';
diff --git a/tests/PhpSpreadsheetTests/Shared/Trend/ExponentialBestFitTest.php b/tests/PhpSpreadsheetTests/Shared/Trend/ExponentialBestFitTest.php
index e6f26bf6e2..47326f9295 100644
--- a/tests/PhpSpreadsheetTests/Shared/Trend/ExponentialBestFitTest.php
+++ b/tests/PhpSpreadsheetTests/Shared/Trend/ExponentialBestFitTest.php
@@ -10,11 +10,10 @@
class ExponentialBestFitTest extends TestCase
{
/**
- * @dataProvider providerExponentialBestFit
- *
* @param array $yValues
* @param array $xValues
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerExponentialBestFit')]
public function testExponentialBestFit(
array $expectedSlope,
array $expectedIntersect,
diff --git a/tests/PhpSpreadsheetTests/Shared/Trend/LinearBestFitTest.php b/tests/PhpSpreadsheetTests/Shared/Trend/LinearBestFitTest.php
index e9de8a2e5c..f23b9bfca5 100644
--- a/tests/PhpSpreadsheetTests/Shared/Trend/LinearBestFitTest.php
+++ b/tests/PhpSpreadsheetTests/Shared/Trend/LinearBestFitTest.php
@@ -12,11 +12,10 @@ class LinearBestFitTest extends TestCase
const LBF_PRECISION = 1.0E-8;
/**
- * @dataProvider providerLinearBestFit
- *
* @param array $yValues
* @param array $xValues
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerLinearBestFit')]
public function testLinearBestFit(
array $expectedSlope,
array $expectedIntersect,
diff --git a/tests/PhpSpreadsheetTests/SpreadsheetTest.php b/tests/PhpSpreadsheetTests/SpreadsheetTest.php
index a35ab101f3..5fbeb4fa4e 100644
--- a/tests/PhpSpreadsheetTests/SpreadsheetTest.php
+++ b/tests/PhpSpreadsheetTests/SpreadsheetTest.php
@@ -52,9 +52,7 @@ public static function dataProviderForSheetNames(): array
return $array;
}
- /**
- * @dataProvider dataProviderForSheetNames
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderForSheetNames')]
public function testGetSheetByName(?int $index, string $sheetName): void
{
$spreadsheet = $this->getSpreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Style/ColorIndexTest.php b/tests/PhpSpreadsheetTests/Style/ColorIndexTest.php
index 31d980ebd3..e2add4c2a1 100644
--- a/tests/PhpSpreadsheetTests/Style/ColorIndexTest.php
+++ b/tests/PhpSpreadsheetTests/Style/ColorIndexTest.php
@@ -9,9 +9,7 @@
class ColorIndexTest extends TestCase
{
- /**
- * @dataProvider providerColorIndexes
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerColorIndexes')]
public function testColorIndex(string $expectedResult, string $xml, bool $background = false): void
{
$sxml = simplexml_load_string($xml);
diff --git a/tests/PhpSpreadsheetTests/Style/ColorTest.php b/tests/PhpSpreadsheetTests/Style/ColorTest.php
index 91f03e3fee..0b8093d68c 100644
--- a/tests/PhpSpreadsheetTests/Style/ColorTest.php
+++ b/tests/PhpSpreadsheetTests/Style/ColorTest.php
@@ -76,9 +76,7 @@ public function testRGBFromArray(): void
self::assertEquals('FF123456', $color->getARGB());
}
- /**
- * @dataProvider providerColorGetRed
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerColorGetRed')]
public function testGetRed(mixed $expectedResult, string $color, ?bool $bool = null): void
{
if ($bool === null) {
@@ -94,9 +92,7 @@ public static function providerColorGetRed(): array
return require 'tests/data/Style/Color/ColorGetRed.php';
}
- /**
- * @dataProvider providerColorGetGreen
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerColorGetGreen')]
public function testGetGreen(mixed $expectedResult, string $color, ?bool $bool = null): void
{
if ($bool === null) {
@@ -112,9 +108,7 @@ public static function providerColorGetGreen(): array
return require 'tests/data/Style/Color/ColorGetGreen.php';
}
- /**
- * @dataProvider providerColorGetBlue
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerColorGetBlue')]
public function testGetBlue(mixed $expectedResult, string $color, ?bool $bool = null): void
{
if ($bool === null) {
@@ -130,9 +124,7 @@ public static function providerColorGetBlue(): array
return require 'tests/data/Style/Color/ColorGetBlue.php';
}
- /**
- * @dataProvider providerColorChangeBrightness
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providerColorChangeBrightness')]
public function testChangeBrightness(string $expectedResult, string $hexColorValue, float $adjustPercentages): void
{
$result = Color::changeBrightness($hexColorValue, $adjustPercentages);
diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/CellMatcherTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/CellMatcherTest.php
index 334736e87d..00c026169b 100644
--- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/CellMatcherTest.php
+++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/CellMatcherTest.php
@@ -42,9 +42,7 @@ private function confirmString(Worksheet $worksheet, Cell $cell, string $cellAdd
return $cfRange;
}
- /**
- * @dataProvider basicCellIsComparisonDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('basicCellIsComparisonDataProvider')]
public function testBasicCellIsComparison(string $sheetname, string $cellAddress, array $expectedMatches): void
{
$this->spreadsheet = $this->loadSpreadsheet();
@@ -112,9 +110,7 @@ public function testUnknownSheet(): void
$this->spreadsheet->getSheetByNameOrThrow($sheetname);
}
- /**
- * @dataProvider rangeCellIsComparisonDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('rangeCellIsComparisonDataProvider')]
public function testRangeCellIsComparison(string $sheetname, string $cellAddress, bool $expectedMatch): void
{
$this->spreadsheet = $this->loadSpreadsheet();
@@ -153,9 +149,7 @@ public static function rangeCellIsComparisonDataProvider(): array
];
}
- /**
- * @dataProvider cellIsExpressionMultipleDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('cellIsExpressionMultipleDataProvider')]
public function testCellIsMultipleExpression(string $sheetname, string $cellAddress, array $expectedMatches): void
{
$this->spreadsheet = $this->loadSpreadsheet();
@@ -187,9 +181,7 @@ public static function cellIsExpressionMultipleDataProvider(): array
];
}
- /**
- * @dataProvider cellIsExpressionDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('cellIsExpressionDataProvider')]
public function testCellIsExpression(string $sheetname, string $cellAddress, bool $expectedMatch): void
{
$this->spreadsheet = $this->loadSpreadsheet();
@@ -231,9 +223,7 @@ public static function cellIsExpressionDataProvider(): array
];
}
- /**
- * @dataProvider textExpressionsDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('textExpressionsDataProvider')]
public function testTextExpressions(string $sheetname, string $cellAddress, bool $expectedMatch): void
{
$this->spreadsheet = $this->loadSpreadsheet();
@@ -339,9 +329,7 @@ public static function textExpressionsDataProvider(): array
];
}
- /**
- * @dataProvider blanksDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('blanksDataProvider')]
public function testBlankExpressions(string $sheetname, string $cellAddress, array $expectedMatches): void
{
$this->spreadsheet = $this->loadSpreadsheet();
@@ -370,9 +358,7 @@ public static function blanksDataProvider(): array
];
}
- /**
- * @dataProvider errorDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('errorDataProvider')]
public function testErrorExpressions(string $sheetname, string $cellAddress, array $expectedMatches): void
{
$this->spreadsheet = $this->loadSpreadsheet();
@@ -400,9 +386,7 @@ public static function errorDataProvider(): array
];
}
- /**
- * @dataProvider dateOccurringDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dateOccurringDataProvider')]
public function testDateOccurringExpressions(string $sheetname, string $cellAddress, bool $expectedMatch): void
{
$this->spreadsheet = $this->loadSpreadsheet();
@@ -442,9 +426,7 @@ public static function dateOccurringDataProvider(): array
];
}
- /**
- * @dataProvider duplicatesDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('duplicatesDataProvider')]
public function testDuplicatesExpressions(string $sheetname, string $cellAddress, array $expectedMatches): void
{
$this->spreadsheet = $this->loadSpreadsheet();
@@ -476,9 +458,7 @@ public static function duplicatesDataProvider(): array
];
}
- /**
- * @dataProvider textCrossWorksheetDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('textCrossWorksheetDataProvider')]
public function testCrossWorksheetExpressions(string $sheetname, string $cellAddress, bool $expectedMatch): void
{
$this->spreadsheet = $this->loadSpreadsheet();
diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/CellValueWizardTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/CellValueWizardTest.php
index d16ca99ea5..2dc0a2463c 100644
--- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/CellValueWizardTest.php
+++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/CellValueWizardTest.php
@@ -24,9 +24,7 @@ protected function setUp(): void
$this->style = new Style();
}
- /**
- * @dataProvider basicCellValueDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('basicCellValueDataProvider')]
public function testBasicCellValueWizard(string $operator, mixed $operand, string $expectedOperator, mixed $expectedCondition): void
{
$ruleType = Wizard::CELL_VALUE;
@@ -63,9 +61,7 @@ public static function basicCellValueDataProvider(): array
];
}
- /**
- * @dataProvider relativeCellValueDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('relativeCellValueDataProvider')]
public function testRelativeCellValueWizard(mixed $operand, mixed $expectedCondition): void
{
$ruleType = Wizard::CELL_VALUE;
@@ -94,9 +90,7 @@ public static function relativeCellValueDataProvider(): array
];
}
- /**
- * @dataProvider formulaCellValueDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('formulaCellValueDataProvider')]
public function testCellValueWizardWithFormula(mixed $operand, mixed $expectedCondition): void
{
$ruleType = Wizard::CELL_VALUE;
@@ -129,9 +123,7 @@ public static function formulaCellValueDataProvider(): array
];
}
- /**
- * @dataProvider rangeCellValueDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('rangeCellValueDataProvider')]
public function testRangeCellValueWizard(string $operator, array $operands, string $expectedOperator): void
{
$ruleType = Wizard::CELL_VALUE;
@@ -161,9 +153,7 @@ public static function rangeCellValueDataProvider(): array
];
}
- /**
- * @dataProvider rangeRelativeCellValueDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('rangeRelativeCellValueDataProvider')]
public function testRelativeRangeCellValueWizard(array $operands, array $expectedConditions): void
{
$ruleType = Wizard::CELL_VALUE;
@@ -193,9 +183,7 @@ public static function rangeRelativeCellValueDataProvider(): array
];
}
- /**
- * @dataProvider rangeFormulaCellValueDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('rangeFormulaCellValueDataProvider')]
public function testFormulaRangeCellValueWizard(array $operands, array $expectedConditions): void
{
$ruleType = Wizard::CELL_VALUE;
diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DateValueWizardTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DateValueWizardTest.php
index 57778fc8d3..cb2175bc60 100644
--- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DateValueWizardTest.php
+++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DateValueWizardTest.php
@@ -24,9 +24,7 @@ protected function setUp(): void
$this->style = new Style();
}
- /**
- * @dataProvider dateValueWizardProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dateValueWizardProvider')]
public function testDateValueWizard(string $operator, string $expectedReference, string $expectedExpression): void
{
$ruleType = Wizard::DATES_OCCURRING;
diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ExpressionWizardTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ExpressionWizardTest.php
index 770af66af1..d012814235 100644
--- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ExpressionWizardTest.php
+++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ExpressionWizardTest.php
@@ -24,9 +24,7 @@ protected function setUp(): void
$this->style = new Style();
}
- /**
- * @dataProvider expressionDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('expressionDataProvider')]
public function testExpressionWizard(string $expression, string $expectedExpression): void
{
$ruleType = Wizard::EXPRESSION;
@@ -46,9 +44,7 @@ public function testExpressionWizard(string $expression, string $expectedExpress
self::assertEquals($newWizard, $wizard, 'fromConditional() Failure');
}
- /**
- * @dataProvider expressionDataProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('expressionDataProvider')]
public function testExpressionWizardUsingAlias(string $expression, string $expectedExpression): void
{
$ruleType = Wizard::EXPRESSION;
diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/WizardFactoryTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/WizardFactoryTest.php
index 5002bcaa1a..46f5008607 100644
--- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/WizardFactoryTest.php
+++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/WizardFactoryTest.php
@@ -21,10 +21,9 @@ protected function setUp(): void
}
/**
- * @dataProvider basicWizardFactoryProvider
- *
* @psalm-param class-string