Upgrade to phpunit 7.5

This commit is contained in:
Adrien Crivelli 2019-07-24 23:45:43 -07:00
parent 7faee3d6cc
commit b2070fd181
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
11 changed files with 467 additions and 371 deletions

View File

@ -59,14 +59,13 @@
},
"require-dev": {
"tecnickcom/tcpdf": "^6.2",
"phpunit/phpunit": "^5.7",
"doctrine/instantiator": "^1.0.0",
"dompdf/dompdf": "^0.8.0",
"mpdf/mpdf": "^7.0.0",
"jpgraph/jpgraph": "^4.0",
"friendsofphp/php-cs-fixer": "@stable",
"phpcompatibility/php-compatibility": "^8.0",
"squizlabs/php_codesniffer": "^3.3"
"squizlabs/php_codesniffer": "^3.3",
"phpunit/phpunit": "^7.5"
},
"suggest": {
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",

708
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./tests/bootstrap.php"
backupGlobals="true"
colors="true"
syntaxCheck="true"
disallowTestOutput="true">
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
bootstrap="./tests/bootstrap.php"
backupGlobals="true"
colors="true">
<php>
<ini name="memory_limit" value="2048M"/>
</php>

View File

@ -37,7 +37,7 @@ class EngineeringTest extends TestCase
public function testBESSELI($expectedResult, ...$args)
{
$result = Engineering::BESSELI(...$args);
self::assertEquals($expectedResult, $result, null, self::BESSEL_PRECISION);
self::assertEquals($expectedResult, $result, '', self::BESSEL_PRECISION);
}
public function providerBESSELI()
@ -53,7 +53,7 @@ class EngineeringTest extends TestCase
public function testBESSELJ($expectedResult, ...$args)
{
$result = Engineering::BESSELJ(...$args);
self::assertEquals($expectedResult, $result, null, self::BESSEL_PRECISION);
self::assertEquals($expectedResult, $result, '', self::BESSEL_PRECISION);
}
public function providerBESSELJ()
@ -69,7 +69,7 @@ class EngineeringTest extends TestCase
public function testBESSELK($expectedResult, ...$args)
{
$result = Engineering::BESSELK(...$args);
self::assertEquals($expectedResult, $result, null, self::BESSEL_PRECISION);
self::assertEquals($expectedResult, $result, '', self::BESSEL_PRECISION);
}
public function providerBESSELK()
@ -85,7 +85,7 @@ class EngineeringTest extends TestCase
public function testBESSELY($expectedResult, ...$args)
{
$result = Engineering::BESSELY(...$args);
self::assertEquals($expectedResult, $result, null, self::BESSEL_PRECISION);
self::assertEquals($expectedResult, $result, '', self::BESSEL_PRECISION);
}
public function providerBESSELY()
@ -100,7 +100,7 @@ class EngineeringTest extends TestCase
*/
public function testParseComplex()
{
list($real, $imaginary, $suffix) = [1.23e-4, 5.67e+8, 'j'];
[$real, $imaginary, $suffix] = [1.23e-4, 5.67e+8, 'j'];
$result = Engineering::parseComplex('1.23e-4+5.67e+8j');
$this->assertArrayHasKey('real', $result);
@ -136,7 +136,7 @@ class EngineeringTest extends TestCase
public function testIMAGINARY($expectedResult, $value)
{
$result = Engineering::IMAGINARY($value);
self::assertEquals($expectedResult, $result, null, self::COMPLEX_PRECISION);
self::assertEquals($expectedResult, $result, '', self::COMPLEX_PRECISION);
}
public function providerIMAGINARY()
@ -153,7 +153,7 @@ class EngineeringTest extends TestCase
public function testIMREAL($expectedResult, $value)
{
$result = Engineering::IMREAL($value);
self::assertEquals($expectedResult, $result, null, self::COMPLEX_PRECISION);
self::assertEquals($expectedResult, $result, '', self::COMPLEX_PRECISION);
}
public function providerIMREAL()
@ -170,7 +170,7 @@ class EngineeringTest extends TestCase
public function testIMABS($expectedResult, $value)
{
$result = Engineering::IMABS($value);
self::assertEquals($expectedResult, $result, null, self::COMPLEX_PRECISION);
self::assertEquals($expectedResult, $result, '', self::COMPLEX_PRECISION);
}
public function providerIMABS()
@ -187,7 +187,7 @@ class EngineeringTest extends TestCase
public function testIMARGUMENT($expectedResult, $value)
{
$result = Engineering::IMARGUMENT($value);
self::assertEquals($expectedResult, $result, null, self::COMPLEX_PRECISION);
self::assertEquals($expectedResult, $result, '', self::COMPLEX_PRECISION);
}
public function providerIMARGUMENT()
@ -618,7 +618,7 @@ class EngineeringTest extends TestCase
public function testERF($expectedResult, ...$args)
{
$result = Engineering::ERF(...$args);
self::assertEquals($expectedResult, $result, null, self::ERF_PRECISION);
self::assertEquals($expectedResult, $result, '', self::ERF_PRECISION);
}
public function providerERF()
@ -634,7 +634,7 @@ class EngineeringTest extends TestCase
public function testERFPRECISE($expectedResult, ...$args)
{
$result = Engineering::ERFPRECISE(...$args);
self::assertEquals($expectedResult, $result, null, self::ERF_PRECISION);
self::assertEquals($expectedResult, $result, '', self::ERF_PRECISION);
}
public function providerERFPRECISE()
@ -650,7 +650,7 @@ class EngineeringTest extends TestCase
public function testERFC($expectedResult, ...$args)
{
$result = Engineering::ERFC(...$args);
self::assertEquals($expectedResult, $result, null, self::ERF_PRECISION);
self::assertEquals($expectedResult, $result, '', self::ERF_PRECISION);
}
public function providerERFC()
@ -714,7 +714,7 @@ class EngineeringTest extends TestCase
public function testDEC2BIN($expectedResult, ...$args)
{
$result = Engineering::DECTOBIN(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerDEC2BIN()
@ -730,7 +730,7 @@ class EngineeringTest extends TestCase
public function testDEC2HEX($expectedResult, ...$args)
{
$result = Engineering::DECTOHEX(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerDEC2HEX()
@ -746,7 +746,7 @@ class EngineeringTest extends TestCase
public function testDEC2OCT($expectedResult, ...$args)
{
$result = Engineering::DECTOOCT(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerDEC2OCT()
@ -762,7 +762,7 @@ class EngineeringTest extends TestCase
public function testHEX2BIN($expectedResult, ...$args)
{
$result = Engineering::HEXTOBIN(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerHEX2BIN()
@ -778,7 +778,7 @@ class EngineeringTest extends TestCase
public function testHEX2DEC($expectedResult, ...$args)
{
$result = Engineering::HEXTODEC(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerHEX2DEC()
@ -794,7 +794,7 @@ class EngineeringTest extends TestCase
public function testHEX2OCT($expectedResult, ...$args)
{
$result = Engineering::HEXTOOCT(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerHEX2OCT()
@ -810,7 +810,7 @@ class EngineeringTest extends TestCase
public function testOCT2BIN($expectedResult, ...$args)
{
$result = Engineering::OCTTOBIN(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerOCT2BIN()
@ -826,7 +826,7 @@ class EngineeringTest extends TestCase
public function testOCT2DEC($expectedResult, ...$args)
{
$result = Engineering::OCTTODEC(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerOCT2DEC()
@ -842,7 +842,7 @@ class EngineeringTest extends TestCase
public function testOCT2HEX($expectedResult, ...$args)
{
$result = Engineering::OCTTOHEX(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerOCT2HEX()
@ -859,7 +859,7 @@ class EngineeringTest extends TestCase
public function testBITAND($expectedResult, array $args)
{
$result = Engineering::BITAND(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerBITAND()
@ -876,7 +876,7 @@ class EngineeringTest extends TestCase
public function testBITOR($expectedResult, array $args)
{
$result = Engineering::BITOR(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerBITOR()
@ -893,7 +893,7 @@ class EngineeringTest extends TestCase
public function testBITXOR($expectedResult, array $args)
{
$result = Engineering::BITXOR(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerBITXOR()
@ -910,7 +910,7 @@ class EngineeringTest extends TestCase
public function testBITLSHIFT($expectedResult, array $args)
{
$result = Engineering::BITLSHIFT(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerBITLSHIFT()
@ -927,7 +927,7 @@ class EngineeringTest extends TestCase
public function testBITRSHIFT($expectedResult, array $args)
{
$result = Engineering::BITRSHIFT(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerBITRSHIFT()
@ -943,7 +943,7 @@ class EngineeringTest extends TestCase
public function testDELTA($expectedResult, ...$args)
{
$result = Engineering::DELTA(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerDELTA()
@ -959,7 +959,7 @@ class EngineeringTest extends TestCase
public function testGESTEP($expectedResult, ...$args)
{
$result = Engineering::GESTEP(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerGESTEP()
@ -999,7 +999,7 @@ class EngineeringTest extends TestCase
public function testCONVERTUOM($expectedResult, ...$args)
{
$result = Engineering::CONVERTUOM(...$args);
self::assertEquals($expectedResult, $result, null);
self::assertEquals($expectedResult, $result, '');
}
public function providerCONVERTUOM()

View File

@ -114,7 +114,7 @@ class FunctionsTest extends TestCase
public function testIsBlank($expectedResult, ...$args)
{
$result = Functions::isBlank(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerIsBlank()
@ -130,7 +130,7 @@ class FunctionsTest extends TestCase
public function testIsErr($expectedResult, ...$args)
{
$result = Functions::isErr(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerIsErr()
@ -146,7 +146,7 @@ class FunctionsTest extends TestCase
public function testIsError($expectedResult, ...$args)
{
$result = Functions::isError(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerIsError()
@ -162,7 +162,7 @@ class FunctionsTest extends TestCase
public function testErrorType($expectedResult, ...$args)
{
$result = Functions::errorType(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerErrorType()
@ -178,7 +178,7 @@ class FunctionsTest extends TestCase
public function testIsLogical($expectedResult, ...$args)
{
$result = Functions::isLogical(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerIsLogical()
@ -194,7 +194,7 @@ class FunctionsTest extends TestCase
public function testIsNa($expectedResult, ...$args)
{
$result = Functions::isNa(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerIsNa()
@ -210,7 +210,7 @@ class FunctionsTest extends TestCase
public function testIsNumber($expectedResult, ...$args)
{
$result = Functions::isNumber(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerIsNumber()
@ -226,7 +226,7 @@ class FunctionsTest extends TestCase
public function testIsText($expectedResult, ...$args)
{
$result = Functions::isText(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerIsText()
@ -242,7 +242,7 @@ class FunctionsTest extends TestCase
public function testIsNonText($expectedResult, ...$args)
{
$result = Functions::isNonText(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerIsNonText()
@ -258,7 +258,7 @@ class FunctionsTest extends TestCase
public function testIsEven($expectedResult, ...$args)
{
$result = Functions::isEven(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerIsEven()
@ -274,7 +274,7 @@ class FunctionsTest extends TestCase
public function testIsOdd($expectedResult, ...$args)
{
$result = Functions::isOdd(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerIsOdd()
@ -290,7 +290,7 @@ class FunctionsTest extends TestCase
public function testTYPE($expectedResult, ...$args)
{
$result = Functions::TYPE(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerTYPE()
@ -306,7 +306,7 @@ class FunctionsTest extends TestCase
public function testN($expectedResult, ...$args)
{
$result = Functions::n(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerN()
@ -359,7 +359,7 @@ class FunctionsTest extends TestCase
}
$result = Functions::isFormula($reference, $ourCell);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerIsFormula()

View File

@ -178,7 +178,7 @@ class LookupRefTest extends TestCase
}
$result = LookupRef::FORMULATEXT($reference, $ourCell);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerFormulaText()

View File

@ -362,7 +362,7 @@ class TextDataTest extends TestCase
StringHelper::setCurrencyCode('$');
$result = TextData::VALUE(...$args);
self::assertEquals($expectedResult, $result, null, 1E-8);
self::assertEquals($expectedResult, $result, '', 1E-8);
}
public function providerVALUE()
@ -383,7 +383,7 @@ class TextDataTest extends TestCase
StringHelper::setCurrencyCode('$');
$result = TextData::EXACT(...$args);
self::assertSame($expectedResult, $result, null);
self::assertSame($expectedResult, $result);
}
/**

View File

@ -21,6 +21,8 @@ class SampleTest extends TestCase
});
require $sample;
self::assertTrue(true);
}
public function providerSample()

View File

@ -55,7 +55,7 @@ class DateTest extends TestCase
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$result = Date::timestampToExcel(...$args);
self::assertEquals($expectedResult, $result, null, 1E-5);
self::assertEquals($expectedResult, $result, '', 1E-5);
}
public function providerDateTimeTimestampToExcel1900()
@ -73,7 +73,7 @@ class DateTest extends TestCase
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$result = Date::dateTimeToExcel(...$args);
self::assertEquals($expectedResult, $result, null, 1E-5);
self::assertEquals($expectedResult, $result, '', 1E-5);
}
public function providerDateTimeDateTimeToExcel()
@ -91,7 +91,7 @@ class DateTest extends TestCase
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$result = Date::formattedPHPToExcel(...$args);
self::assertEquals($expectedResult, $result, null, 1E-5);
self::assertEquals($expectedResult, $result, '', 1E-5);
}
public function providerDateTimeFormattedPHPToExcel1900()
@ -127,7 +127,7 @@ class DateTest extends TestCase
Date::setExcelCalendar(Date::CALENDAR_MAC_1904);
$result = Date::timestampToExcel(...$args);
self::assertEquals($expectedResult, $result, null, 1E-5);
self::assertEquals($expectedResult, $result, '', 1E-5);
}
public function providerDateTimeTimestampToExcel1904()

View File

@ -37,17 +37,17 @@ return [
'#,##0.00',
],
[
'1.23E05',
'1.23E+5',
123456.789,
'0.00E+00',
],
[
'-1.23E05',
'-1.23E+5',
-123456.789,
'0.00E+00',
],
[
'1.23E-05',
'1.23E-5',
1.2345E-5,
'0.00E+00',
],

View File

@ -29,7 +29,7 @@ return [
'##0',
],
[
'12.0',
'12.00',
12,
'#.0#',
],
@ -263,12 +263,12 @@ return [
[
'-70',
-70,
'#,##0;[Red]-#,##0'
'#,##0;[Red]-#,##0',
],
[
'-12,345',
-12345,
'#,##0;[Red]-#,##0'
'#,##0;[Red]-#,##0',
],
// Multiple colors
[