Use `self::assert*()` instead of `$this->assert*()`

Because even if it doesn't make a difference in practice, it is
technically more correct to call static methods statically. It
also better advertise that those methods can be used from any context.
This commit is contained in:
Adrien Crivelli 2017-09-20 14:55:42 +09:00
parent 0477e6fcfe
commit aef4d711f5
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
49 changed files with 527 additions and 527 deletions

View File

@ -25,7 +25,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testDATE($expectedResult, ...$args) public function testDATE($expectedResult, ...$args)
{ {
$result = DateTime::DATE(...$args); $result = DateTime::DATE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerDATE() public function providerDATE()
@ -38,7 +38,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC); Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC);
$result = DateTime::DATE(2012, 1, 31); $result = DateTime::DATE(2012, 1, 31);
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
$this->assertEquals(1327968000, $result, null, 1E-8); self::assertEquals(1327968000, $result, null, 1E-8);
} }
public function testDATEtoPHPObject() public function testDATEtoPHPObject()
@ -47,11 +47,11 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$result = DateTime::DATE(2012, 1, 31); $result = DateTime::DATE(2012, 1, 31);
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertInternalType('object', $result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTime')); self::assertTrue(is_a($result, 'DateTime'));
// ... with the correct value // ... with the correct value
$this->assertEquals($result->format('d-M-Y'), '31-Jan-2012'); self::assertEquals($result->format('d-M-Y'), '31-Jan-2012');
} }
public function testDATEwith1904Calendar() public function testDATEwith1904Calendar()
@ -59,7 +59,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
Date::setExcelCalendar(Date::CALENDAR_MAC_1904); Date::setExcelCalendar(Date::CALENDAR_MAC_1904);
$result = DateTime::DATE(1918, 11, 11); $result = DateTime::DATE(1918, 11, 11);
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$this->assertEquals($result, 5428); self::assertEquals($result, 5428);
} }
public function testDATEwith1904CalendarError() public function testDATEwith1904CalendarError()
@ -67,7 +67,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
Date::setExcelCalendar(Date::CALENDAR_MAC_1904); Date::setExcelCalendar(Date::CALENDAR_MAC_1904);
$result = DateTime::DATE(1901, 1, 31); $result = DateTime::DATE(1901, 1, 31);
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$this->assertEquals($result, '#NUM!'); self::assertEquals($result, '#NUM!');
} }
/** /**
@ -78,7 +78,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testDATEVALUE($expectedResult, ...$args) public function testDATEVALUE($expectedResult, ...$args)
{ {
$result = DateTime::DATEVALUE(...$args); $result = DateTime::DATEVALUE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerDATEVALUE() public function providerDATEVALUE()
@ -91,7 +91,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC); Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC);
$result = DateTime::DATEVALUE('2012-1-31'); $result = DateTime::DATEVALUE('2012-1-31');
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
$this->assertEquals(1327968000, $result, null, 1E-8); self::assertEquals(1327968000, $result, null, 1E-8);
} }
public function testDATEVALUEtoPHPObject() public function testDATEVALUEtoPHPObject()
@ -100,11 +100,11 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$result = DateTime::DATEVALUE('2012-1-31'); $result = DateTime::DATEVALUE('2012-1-31');
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertInternalType('object', $result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTime')); self::assertTrue(is_a($result, 'DateTime'));
// ... with the correct value // ... with the correct value
$this->assertEquals($result->format('d-M-Y'), '31-Jan-2012'); self::assertEquals($result->format('d-M-Y'), '31-Jan-2012');
} }
/** /**
@ -115,7 +115,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testYEAR($expectedResult, ...$args) public function testYEAR($expectedResult, ...$args)
{ {
$result = DateTime::YEAR(...$args); $result = DateTime::YEAR(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerYEAR() public function providerYEAR()
@ -131,7 +131,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testMONTH($expectedResult, ...$args) public function testMONTH($expectedResult, ...$args)
{ {
$result = DateTime::MONTHOFYEAR(...$args); $result = DateTime::MONTHOFYEAR(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerMONTH() public function providerMONTH()
@ -147,7 +147,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testWEEKNUM($expectedResult, ...$args) public function testWEEKNUM($expectedResult, ...$args)
{ {
$result = DateTime::WEEKNUM(...$args); $result = DateTime::WEEKNUM(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerWEEKNUM() public function providerWEEKNUM()
@ -163,7 +163,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testWEEKDAY($expectedResult, ...$args) public function testWEEKDAY($expectedResult, ...$args)
{ {
$result = DateTime::WEEKDAY(...$args); $result = DateTime::WEEKDAY(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerWEEKDAY() public function providerWEEKDAY()
@ -179,7 +179,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testDAY($expectedResult, ...$args) public function testDAY($expectedResult, ...$args)
{ {
$result = DateTime::DAYOFMONTH(...$args); $result = DateTime::DAYOFMONTH(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerDAY() public function providerDAY()
@ -195,7 +195,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testTIME($expectedResult, ...$args) public function testTIME($expectedResult, ...$args)
{ {
$result = DateTime::TIME(...$args); $result = DateTime::TIME(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerTIME() public function providerTIME()
@ -208,7 +208,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC); Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC);
$result = DateTime::TIME(7, 30, 20); $result = DateTime::TIME(7, 30, 20);
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
$this->assertEquals(27020, $result, null, 1E-8); self::assertEquals(27020, $result, null, 1E-8);
} }
public function testTIMEtoPHPObject() public function testTIMEtoPHPObject()
@ -217,11 +217,11 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$result = DateTime::TIME(7, 30, 20); $result = DateTime::TIME(7, 30, 20);
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertInternalType('object', $result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTime')); self::assertTrue(is_a($result, 'DateTime'));
// ... with the correct value // ... with the correct value
$this->assertEquals($result->format('H:i:s'), '07:30:20'); self::assertEquals($result->format('H:i:s'), '07:30:20');
} }
/** /**
@ -232,7 +232,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testTIMEVALUE($expectedResult, ...$args) public function testTIMEVALUE($expectedResult, ...$args)
{ {
$result = DateTime::TIMEVALUE(...$args); $result = DateTime::TIMEVALUE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerTIMEVALUE() public function providerTIMEVALUE()
@ -245,7 +245,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC); Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC);
$result = DateTime::TIMEVALUE('7:30:20'); $result = DateTime::TIMEVALUE('7:30:20');
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
$this->assertEquals(23420, $result, null, 1E-8); self::assertEquals(23420, $result, null, 1E-8);
} }
public function testTIMEVALUEtoPHPObject() public function testTIMEVALUEtoPHPObject()
@ -254,11 +254,11 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$result = DateTime::TIMEVALUE('7:30:20'); $result = DateTime::TIMEVALUE('7:30:20');
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertInternalType('object', $result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTime')); self::assertTrue(is_a($result, 'DateTime'));
// ... with the correct value // ... with the correct value
$this->assertEquals($result->format('H:i:s'), '07:30:20'); self::assertEquals($result->format('H:i:s'), '07:30:20');
} }
/** /**
@ -269,7 +269,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testHOUR($expectedResult, ...$args) public function testHOUR($expectedResult, ...$args)
{ {
$result = DateTime::HOUROFDAY(...$args); $result = DateTime::HOUROFDAY(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerHOUR() public function providerHOUR()
@ -285,7 +285,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testMINUTE($expectedResult, ...$args) public function testMINUTE($expectedResult, ...$args)
{ {
$result = DateTime::MINUTE(...$args); $result = DateTime::MINUTE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerMINUTE() public function providerMINUTE()
@ -301,7 +301,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testSECOND($expectedResult, ...$args) public function testSECOND($expectedResult, ...$args)
{ {
$result = DateTime::SECOND(...$args); $result = DateTime::SECOND(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerSECOND() public function providerSECOND()
@ -317,7 +317,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testNETWORKDAYS($expectedResult, ...$args) public function testNETWORKDAYS($expectedResult, ...$args)
{ {
$result = DateTime::NETWORKDAYS(...$args); $result = DateTime::NETWORKDAYS(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerNETWORKDAYS() public function providerNETWORKDAYS()
@ -333,7 +333,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testWORKDAY($expectedResult, ...$args) public function testWORKDAY($expectedResult, ...$args)
{ {
$result = DateTime::WORKDAY(...$args); $result = DateTime::WORKDAY(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerWORKDAY() public function providerWORKDAY()
@ -349,7 +349,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testEDATE($expectedResult, ...$args) public function testEDATE($expectedResult, ...$args)
{ {
$result = DateTime::EDATE(...$args); $result = DateTime::EDATE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerEDATE() public function providerEDATE()
@ -362,7 +362,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC); Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC);
$result = DateTime::EDATE('2012-1-26', -1); $result = DateTime::EDATE('2012-1-26', -1);
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
$this->assertEquals(1324857600, $result, null, 1E-8); self::assertEquals(1324857600, $result, null, 1E-8);
} }
public function testEDATEtoPHPObject() public function testEDATEtoPHPObject()
@ -371,11 +371,11 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$result = DateTime::EDATE('2012-1-26', -1); $result = DateTime::EDATE('2012-1-26', -1);
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertInternalType('object', $result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTime')); self::assertTrue(is_a($result, 'DateTime'));
// ... with the correct value // ... with the correct value
$this->assertEquals($result->format('d-M-Y'), '26-Dec-2011'); self::assertEquals($result->format('d-M-Y'), '26-Dec-2011');
} }
/** /**
@ -386,7 +386,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testEOMONTH($expectedResult, ...$args) public function testEOMONTH($expectedResult, ...$args)
{ {
$result = DateTime::EOMONTH(...$args); $result = DateTime::EOMONTH(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerEOMONTH() public function providerEOMONTH()
@ -399,7 +399,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC); Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC);
$result = DateTime::EOMONTH('2012-1-26', -1); $result = DateTime::EOMONTH('2012-1-26', -1);
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
$this->assertEquals(1325289600, $result, null, 1E-8); self::assertEquals(1325289600, $result, null, 1E-8);
} }
public function testEOMONTHtoPHPObject() public function testEOMONTHtoPHPObject()
@ -408,11 +408,11 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
$result = DateTime::EOMONTH('2012-1-26', -1); $result = DateTime::EOMONTH('2012-1-26', -1);
Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
// Must return an object... // Must return an object...
$this->assertInternalType('object', $result); self::assertInternalType('object', $result);
// ... of the correct type // ... of the correct type
$this->assertTrue(is_a($result, 'DateTime')); self::assertTrue(is_a($result, 'DateTime'));
// ... with the correct value // ... with the correct value
$this->assertEquals($result->format('d-M-Y'), '31-Dec-2011'); self::assertEquals($result->format('d-M-Y'), '31-Dec-2011');
} }
/** /**
@ -423,7 +423,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testDATEDIF($expectedResult, ...$args) public function testDATEDIF($expectedResult, ...$args)
{ {
$result = DateTime::DATEDIF(...$args); $result = DateTime::DATEDIF(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerDATEDIF() public function providerDATEDIF()
@ -439,7 +439,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testDAYS360($expectedResult, ...$args) public function testDAYS360($expectedResult, ...$args)
{ {
$result = DateTime::DAYS360(...$args); $result = DateTime::DAYS360(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerDAYS360() public function providerDAYS360()
@ -455,7 +455,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
public function testYEARFRAC($expectedResult, ...$args) public function testYEARFRAC($expectedResult, ...$args)
{ {
$result = DateTime::YEARFRAC(...$args); $result = DateTime::YEARFRAC(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerYEARFRAC() public function providerYEARFRAC()

View File

@ -33,7 +33,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testBESSELI($expectedResult, ...$args) public function testBESSELI($expectedResult, ...$args)
{ {
$result = Engineering::BESSELI(...$args); $result = Engineering::BESSELI(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerBESSELI() public function providerBESSELI()
@ -49,7 +49,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testBESSELJ($expectedResult, ...$args) public function testBESSELJ($expectedResult, ...$args)
{ {
$result = Engineering::BESSELJ(...$args); $result = Engineering::BESSELJ(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerBESSELJ() public function providerBESSELJ()
@ -65,7 +65,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testBESSELK($expectedResult, ...$args) public function testBESSELK($expectedResult, ...$args)
{ {
$result = Engineering::BESSELK(...$args); $result = Engineering::BESSELK(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerBESSELK() public function providerBESSELK()
@ -81,7 +81,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testBESSELY($expectedResult, ...$args) public function testBESSELY($expectedResult, ...$args)
{ {
$result = Engineering::BESSELY(...$args); $result = Engineering::BESSELY(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerBESSELY() public function providerBESSELY()
@ -97,7 +97,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testCOMPLEX($expectedResult, ...$args) public function testCOMPLEX($expectedResult, ...$args)
{ {
$result = Engineering::COMPLEX(...$args); $result = Engineering::COMPLEX(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerCOMPLEX() public function providerCOMPLEX()
@ -113,7 +113,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMAGINARY($expectedResult, ...$args) public function testIMAGINARY($expectedResult, ...$args)
{ {
$result = Engineering::IMAGINARY(...$args); $result = Engineering::IMAGINARY(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIMAGINARY() public function providerIMAGINARY()
@ -129,7 +129,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMREAL($expectedResult, ...$args) public function testIMREAL($expectedResult, ...$args)
{ {
$result = Engineering::IMREAL(...$args); $result = Engineering::IMREAL(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIMREAL() public function providerIMREAL()
@ -145,7 +145,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMABS($expectedResult, ...$args) public function testIMABS($expectedResult, ...$args)
{ {
$result = Engineering::IMABS(...$args); $result = Engineering::IMABS(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIMABS() public function providerIMABS()
@ -162,7 +162,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMARGUMENT($expectedResult, ...$args) public function testIMARGUMENT($expectedResult, ...$args)
{ {
$result = Engineering::IMARGUMENT(...$args); $result = Engineering::IMARGUMENT(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIMARGUMENT() public function providerIMARGUMENT()
@ -178,7 +178,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMCONJUGATE($expectedResult, ...$args) public function testIMCONJUGATE($expectedResult, ...$args)
{ {
$result = Engineering::IMCONJUGATE(...$args); $result = Engineering::IMCONJUGATE(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMCONJUGATE() public function providerIMCONJUGATE()
@ -194,7 +194,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMCOS($expectedResult, ...$args) public function testIMCOS($expectedResult, ...$args)
{ {
$result = Engineering::IMCOS(...$args); $result = Engineering::IMCOS(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMCOS() public function providerIMCOS()
@ -213,7 +213,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$this->markTestIncomplete('TODO: This test should be fixed'); $this->markTestIncomplete('TODO: This test should be fixed');
$result = Engineering::IMDIV(...$args); $result = Engineering::IMDIV(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMDIV() public function providerIMDIV()
@ -229,7 +229,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMEXP($expectedResult, ...$args) public function testIMEXP($expectedResult, ...$args)
{ {
$result = Engineering::IMEXP(...$args); $result = Engineering::IMEXP(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMEXP() public function providerIMEXP()
@ -245,7 +245,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMLN($expectedResult, ...$args) public function testIMLN($expectedResult, ...$args)
{ {
$result = Engineering::IMLN(...$args); $result = Engineering::IMLN(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMLN() public function providerIMLN()
@ -261,7 +261,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMLOG2($expectedResult, ...$args) public function testIMLOG2($expectedResult, ...$args)
{ {
$result = Engineering::IMLOG2(...$args); $result = Engineering::IMLOG2(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMLOG2() public function providerIMLOG2()
@ -277,7 +277,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMLOG10($expectedResult, ...$args) public function testIMLOG10($expectedResult, ...$args)
{ {
$result = Engineering::IMLOG10(...$args); $result = Engineering::IMLOG10(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMLOG10() public function providerIMLOG10()
@ -296,7 +296,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$this->markTestIncomplete('TODO: This test should be fixed'); $this->markTestIncomplete('TODO: This test should be fixed');
$result = Engineering::IMPOWER(...$args); $result = Engineering::IMPOWER(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMPOWER() public function providerIMPOWER()
@ -312,7 +312,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMPRODUCT($expectedResult, ...$args) public function testIMPRODUCT($expectedResult, ...$args)
{ {
$result = Engineering::IMPRODUCT(...$args); $result = Engineering::IMPRODUCT(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMPRODUCT() public function providerIMPRODUCT()
@ -328,7 +328,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMSIN($expectedResult, ...$args) public function testIMSIN($expectedResult, ...$args)
{ {
$result = Engineering::IMSIN(...$args); $result = Engineering::IMSIN(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMSIN() public function providerIMSIN()
@ -344,7 +344,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMSQRT($expectedResult, ...$args) public function testIMSQRT($expectedResult, ...$args)
{ {
$result = Engineering::IMSQRT(...$args); $result = Engineering::IMSQRT(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMSQRT() public function providerIMSQRT()
@ -363,7 +363,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
$this->markTestIncomplete('TODO: This test should be fixed'); $this->markTestIncomplete('TODO: This test should be fixed');
$result = Engineering::IMSUB(...$args); $result = Engineering::IMSUB(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMSUB() public function providerIMSUB()
@ -380,7 +380,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testIMSUM($expectedResult, ...$args) public function testIMSUM($expectedResult, ...$args)
{ {
$result = Engineering::IMSUM(...$args); $result = Engineering::IMSUM(...$args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage()); self::assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
} }
public function providerIMSUM() public function providerIMSUM()
@ -396,7 +396,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testERF($expectedResult, ...$args) public function testERF($expectedResult, ...$args)
{ {
$result = Engineering::ERF(...$args); $result = Engineering::ERF(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerERF() public function providerERF()
@ -412,7 +412,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testERFC($expectedResult, ...$args) public function testERFC($expectedResult, ...$args)
{ {
$result = Engineering::ERFC(...$args); $result = Engineering::ERFC(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerERFC() public function providerERFC()
@ -428,7 +428,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testBIN2DEC($expectedResult, ...$args) public function testBIN2DEC($expectedResult, ...$args)
{ {
$result = Engineering::BINTODEC(...$args); $result = Engineering::BINTODEC(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerBIN2DEC() public function providerBIN2DEC()
@ -444,7 +444,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testBIN2HEX($expectedResult, ...$args) public function testBIN2HEX($expectedResult, ...$args)
{ {
$result = Engineering::BINTOHEX(...$args); $result = Engineering::BINTOHEX(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerBIN2HEX() public function providerBIN2HEX()
@ -460,7 +460,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testBIN2OCT($expectedResult, ...$args) public function testBIN2OCT($expectedResult, ...$args)
{ {
$result = Engineering::BINTOOCT(...$args); $result = Engineering::BINTOOCT(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerBIN2OCT() public function providerBIN2OCT()
@ -476,7 +476,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testDEC2BIN($expectedResult, ...$args) public function testDEC2BIN($expectedResult, ...$args)
{ {
$result = Engineering::DECTOBIN(...$args); $result = Engineering::DECTOBIN(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerDEC2BIN() public function providerDEC2BIN()
@ -492,7 +492,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testDEC2HEX($expectedResult, ...$args) public function testDEC2HEX($expectedResult, ...$args)
{ {
$result = Engineering::DECTOHEX(...$args); $result = Engineering::DECTOHEX(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerDEC2HEX() public function providerDEC2HEX()
@ -508,7 +508,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testDEC2OCT($expectedResult, ...$args) public function testDEC2OCT($expectedResult, ...$args)
{ {
$result = Engineering::DECTOOCT(...$args); $result = Engineering::DECTOOCT(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerDEC2OCT() public function providerDEC2OCT()
@ -524,7 +524,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testHEX2BIN($expectedResult, ...$args) public function testHEX2BIN($expectedResult, ...$args)
{ {
$result = Engineering::HEXTOBIN(...$args); $result = Engineering::HEXTOBIN(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerHEX2BIN() public function providerHEX2BIN()
@ -540,7 +540,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testHEX2DEC($expectedResult, ...$args) public function testHEX2DEC($expectedResult, ...$args)
{ {
$result = Engineering::HEXTODEC(...$args); $result = Engineering::HEXTODEC(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerHEX2DEC() public function providerHEX2DEC()
@ -556,7 +556,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testHEX2OCT($expectedResult, ...$args) public function testHEX2OCT($expectedResult, ...$args)
{ {
$result = Engineering::HEXTOOCT(...$args); $result = Engineering::HEXTOOCT(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerHEX2OCT() public function providerHEX2OCT()
@ -572,7 +572,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testOCT2BIN($expectedResult, ...$args) public function testOCT2BIN($expectedResult, ...$args)
{ {
$result = Engineering::OCTTOBIN(...$args); $result = Engineering::OCTTOBIN(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerOCT2BIN() public function providerOCT2BIN()
@ -588,7 +588,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testOCT2DEC($expectedResult, ...$args) public function testOCT2DEC($expectedResult, ...$args)
{ {
$result = Engineering::OCTTODEC(...$args); $result = Engineering::OCTTODEC(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerOCT2DEC() public function providerOCT2DEC()
@ -604,7 +604,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testOCT2HEX($expectedResult, ...$args) public function testOCT2HEX($expectedResult, ...$args)
{ {
$result = Engineering::OCTTOHEX(...$args); $result = Engineering::OCTTOHEX(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerOCT2HEX() public function providerOCT2HEX()
@ -620,7 +620,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testDELTA($expectedResult, ...$args) public function testDELTA($expectedResult, ...$args)
{ {
$result = Engineering::DELTA(...$args); $result = Engineering::DELTA(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerDELTA() public function providerDELTA()
@ -636,7 +636,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testGESTEP($expectedResult, ...$args) public function testGESTEP($expectedResult, ...$args)
{ {
$result = Engineering::GESTEP(...$args); $result = Engineering::GESTEP(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerGESTEP() public function providerGESTEP()
@ -647,25 +647,25 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testGetConversionGroups() public function testGetConversionGroups()
{ {
$result = Engineering::getConversionGroups(); $result = Engineering::getConversionGroups();
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
} }
public function testGetConversionGroupUnits() public function testGetConversionGroupUnits()
{ {
$result = Engineering::getConversionGroupUnits(); $result = Engineering::getConversionGroupUnits();
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
} }
public function testGetConversionGroupUnitDetails() public function testGetConversionGroupUnitDetails()
{ {
$result = Engineering::getConversionGroupUnitDetails(); $result = Engineering::getConversionGroupUnitDetails();
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
} }
public function testGetConversionMultipliers() public function testGetConversionMultipliers()
{ {
$result = Engineering::getConversionMultipliers(); $result = Engineering::getConversionMultipliers();
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
} }
/** /**
@ -676,7 +676,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
public function testCONVERTUOM($expectedResult, ...$args) public function testCONVERTUOM($expectedResult, ...$args)
{ {
$result = Engineering::CONVERTUOM(...$args); $result = Engineering::CONVERTUOM(...$args);
$this->assertEquals($expectedResult, $result, null); self::assertEquals($expectedResult, $result, null);
} }
public function providerCONVERTUOM() public function providerCONVERTUOM()

View File

@ -22,7 +22,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testACCRINT($expectedResult, ...$args) public function testACCRINT($expectedResult, ...$args)
{ {
$result = Financial::ACCRINT(...$args); $result = Financial::ACCRINT(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerACCRINT() public function providerACCRINT()
@ -38,7 +38,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testACCRINTM($expectedResult, ...$args) public function testACCRINTM($expectedResult, ...$args)
{ {
$result = Financial::ACCRINTM(...$args); $result = Financial::ACCRINTM(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerACCRINTM() public function providerACCRINTM()
@ -54,7 +54,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testAMORDEGRC($expectedResult, ...$args) public function testAMORDEGRC($expectedResult, ...$args)
{ {
$result = Financial::AMORDEGRC(...$args); $result = Financial::AMORDEGRC(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerAMORDEGRC() public function providerAMORDEGRC()
@ -70,7 +70,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testAMORLINC($expectedResult, ...$args) public function testAMORLINC($expectedResult, ...$args)
{ {
$result = Financial::AMORLINC(...$args); $result = Financial::AMORLINC(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerAMORLINC() public function providerAMORLINC()
@ -86,7 +86,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testCOUPDAYBS($expectedResult, ...$args) public function testCOUPDAYBS($expectedResult, ...$args)
{ {
$result = Financial::COUPDAYBS(...$args); $result = Financial::COUPDAYBS(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerCOUPDAYBS() public function providerCOUPDAYBS()
@ -102,7 +102,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testCOUPDAYS($expectedResult, ...$args) public function testCOUPDAYS($expectedResult, ...$args)
{ {
$result = Financial::COUPDAYS(...$args); $result = Financial::COUPDAYS(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerCOUPDAYS() public function providerCOUPDAYS()
@ -118,7 +118,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testCOUPDAYSNC($expectedResult, ...$args) public function testCOUPDAYSNC($expectedResult, ...$args)
{ {
$result = Financial::COUPDAYSNC(...$args); $result = Financial::COUPDAYSNC(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerCOUPDAYSNC() public function providerCOUPDAYSNC()
@ -134,7 +134,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testCOUPNCD($expectedResult, ...$args) public function testCOUPNCD($expectedResult, ...$args)
{ {
$result = Financial::COUPNCD(...$args); $result = Financial::COUPNCD(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerCOUPNCD() public function providerCOUPNCD()
@ -150,7 +150,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testCOUPNUM($expectedResult, ...$args) public function testCOUPNUM($expectedResult, ...$args)
{ {
$result = Financial::COUPNUM(...$args); $result = Financial::COUPNUM(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerCOUPNUM() public function providerCOUPNUM()
@ -166,7 +166,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testCOUPPCD($expectedResult, ...$args) public function testCOUPPCD($expectedResult, ...$args)
{ {
$result = Financial::COUPPCD(...$args); $result = Financial::COUPPCD(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerCOUPPCD() public function providerCOUPPCD()
@ -182,7 +182,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testCUMIPMT($expectedResult, ...$args) public function testCUMIPMT($expectedResult, ...$args)
{ {
$result = Financial::CUMIPMT(...$args); $result = Financial::CUMIPMT(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerCUMIPMT() public function providerCUMIPMT()
@ -198,7 +198,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testCUMPRINC($expectedResult, ...$args) public function testCUMPRINC($expectedResult, ...$args)
{ {
$result = Financial::CUMPRINC(...$args); $result = Financial::CUMPRINC(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerCUMPRINC() public function providerCUMPRINC()
@ -214,7 +214,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testDB($expectedResult, ...$args) public function testDB($expectedResult, ...$args)
{ {
$result = Financial::DB(...$args); $result = Financial::DB(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerDB() public function providerDB()
@ -230,7 +230,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testDDB($expectedResult, ...$args) public function testDDB($expectedResult, ...$args)
{ {
$result = Financial::DDB(...$args); $result = Financial::DDB(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerDDB() public function providerDDB()
@ -246,7 +246,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testDISC($expectedResult, ...$args) public function testDISC($expectedResult, ...$args)
{ {
$result = Financial::DISC(...$args); $result = Financial::DISC(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerDISC() public function providerDISC()
@ -262,7 +262,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testDOLLARDE($expectedResult, ...$args) public function testDOLLARDE($expectedResult, ...$args)
{ {
$result = Financial::DOLLARDE(...$args); $result = Financial::DOLLARDE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerDOLLARDE() public function providerDOLLARDE()
@ -278,7 +278,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testDOLLARFR($expectedResult, ...$args) public function testDOLLARFR($expectedResult, ...$args)
{ {
$result = Financial::DOLLARFR(...$args); $result = Financial::DOLLARFR(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerDOLLARFR() public function providerDOLLARFR()
@ -294,7 +294,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testEFFECT($expectedResult, ...$args) public function testEFFECT($expectedResult, ...$args)
{ {
$result = Financial::EFFECT(...$args); $result = Financial::EFFECT(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerEFFECT() public function providerEFFECT()
@ -310,7 +310,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testFV($expectedResult, ...$args) public function testFV($expectedResult, ...$args)
{ {
$result = Financial::FV(...$args); $result = Financial::FV(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerFV() public function providerFV()
@ -326,7 +326,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testFVSCHEDULE($expectedResult, ...$args) public function testFVSCHEDULE($expectedResult, ...$args)
{ {
$result = Financial::FVSCHEDULE(...$args); $result = Financial::FVSCHEDULE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerFVSCHEDULE() public function providerFVSCHEDULE()
@ -342,7 +342,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testINTRATE($expectedResult, ...$args) public function testINTRATE($expectedResult, ...$args)
{ {
$result = Financial::INTRATE(...$args); $result = Financial::INTRATE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerINTRATE() public function providerINTRATE()
@ -358,7 +358,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testIPMT($expectedResult, ...$args) public function testIPMT($expectedResult, ...$args)
{ {
$result = Financial::IPMT(...$args); $result = Financial::IPMT(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIPMT() public function providerIPMT()
@ -374,7 +374,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testIRR($expectedResult, ...$args) public function testIRR($expectedResult, ...$args)
{ {
$result = Financial::IRR(...$args); $result = Financial::IRR(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIRR() public function providerIRR()
@ -390,7 +390,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testISPMT($expectedResult, ...$args) public function testISPMT($expectedResult, ...$args)
{ {
$result = Financial::ISPMT(...$args); $result = Financial::ISPMT(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerISPMT() public function providerISPMT()
@ -406,7 +406,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testMIRR($expectedResult, ...$args) public function testMIRR($expectedResult, ...$args)
{ {
$result = Financial::MIRR(...$args); $result = Financial::MIRR(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerMIRR() public function providerMIRR()
@ -422,7 +422,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testNOMINAL($expectedResult, ...$args) public function testNOMINAL($expectedResult, ...$args)
{ {
$result = Financial::NOMINAL(...$args); $result = Financial::NOMINAL(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerNOMINAL() public function providerNOMINAL()
@ -438,7 +438,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testNPER($expectedResult, ...$args) public function testNPER($expectedResult, ...$args)
{ {
$result = Financial::NPER(...$args); $result = Financial::NPER(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerNPER() public function providerNPER()
@ -454,7 +454,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
public function testNPV($expectedResult, ...$args) public function testNPV($expectedResult, ...$args)
{ {
$result = Financial::NPV(...$args); $result = Financial::NPV(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerNPV() public function providerNPV()
@ -473,7 +473,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$this->markTestIncomplete('TODO: This test should be fixed'); $this->markTestIncomplete('TODO: This test should be fixed');
$result = Financial::PRICE(...$args); $result = Financial::PRICE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerPRICE() public function providerPRICE()
@ -492,7 +492,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$this->markTestIncomplete('TODO: This test should be fixed'); $this->markTestIncomplete('TODO: This test should be fixed');
$result = Financial::RATE(...$args); $result = Financial::RATE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerRATE() public function providerRATE()
@ -511,7 +511,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
$this->markTestIncomplete('TODO: This test should be fixed'); $this->markTestIncomplete('TODO: This test should be fixed');
$result = Financial::XIRR(...$args); $result = Financial::XIRR(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerXIRR() public function providerXIRR()

View File

@ -15,49 +15,49 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testDUMMY() public function testDUMMY()
{ {
$result = Functions::DUMMY(); $result = Functions::DUMMY();
$this->assertEquals('#Not Yet Implemented', $result); self::assertEquals('#Not Yet Implemented', $result);
} }
public function testDIV0() public function testDIV0()
{ {
$result = Functions::DIV0(); $result = Functions::DIV0();
$this->assertEquals('#DIV/0!', $result); self::assertEquals('#DIV/0!', $result);
} }
public function testNA() public function testNA()
{ {
$result = Functions::NA(); $result = Functions::NA();
$this->assertEquals('#N/A', $result); self::assertEquals('#N/A', $result);
} }
public function testNAN() public function testNAN()
{ {
$result = Functions::NAN(); $result = Functions::NAN();
$this->assertEquals('#NUM!', $result); self::assertEquals('#NUM!', $result);
} }
public function testNAME() public function testNAME()
{ {
$result = Functions::NAME(); $result = Functions::NAME();
$this->assertEquals('#NAME?', $result); self::assertEquals('#NAME?', $result);
} }
public function testREF() public function testREF()
{ {
$result = Functions::REF(); $result = Functions::REF();
$this->assertEquals('#REF!', $result); self::assertEquals('#REF!', $result);
} }
public function testNULL() public function testNULL()
{ {
$result = Functions::null(); $result = Functions::null();
$this->assertEquals('#NULL!', $result); self::assertEquals('#NULL!', $result);
} }
public function testVALUE() public function testVALUE()
{ {
$result = Functions::VALUE(); $result = Functions::VALUE();
$this->assertEquals('#VALUE!', $result); self::assertEquals('#VALUE!', $result);
} }
/** /**
@ -68,7 +68,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testIsBlank($expectedResult, ...$args) public function testIsBlank($expectedResult, ...$args)
{ {
$result = Functions::isBlank(...$args); $result = Functions::isBlank(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIsBlank() public function providerIsBlank()
@ -84,7 +84,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testIsErr($expectedResult, ...$args) public function testIsErr($expectedResult, ...$args)
{ {
$result = Functions::isErr(...$args); $result = Functions::isErr(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIsErr() public function providerIsErr()
@ -100,7 +100,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testIsError($expectedResult, ...$args) public function testIsError($expectedResult, ...$args)
{ {
$result = Functions::isError(...$args); $result = Functions::isError(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIsError() public function providerIsError()
@ -116,7 +116,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testErrorType($expectedResult, ...$args) public function testErrorType($expectedResult, ...$args)
{ {
$result = Functions::errorType(...$args); $result = Functions::errorType(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerErrorType() public function providerErrorType()
@ -132,7 +132,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testIsLogical($expectedResult, ...$args) public function testIsLogical($expectedResult, ...$args)
{ {
$result = Functions::isLogical(...$args); $result = Functions::isLogical(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIsLogical() public function providerIsLogical()
@ -148,7 +148,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testIsNa($expectedResult, ...$args) public function testIsNa($expectedResult, ...$args)
{ {
$result = Functions::isNa(...$args); $result = Functions::isNa(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIsNa() public function providerIsNa()
@ -164,7 +164,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testIsNumber($expectedResult, ...$args) public function testIsNumber($expectedResult, ...$args)
{ {
$result = Functions::isNumber(...$args); $result = Functions::isNumber(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIsNumber() public function providerIsNumber()
@ -180,7 +180,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testIsText($expectedResult, ...$args) public function testIsText($expectedResult, ...$args)
{ {
$result = Functions::isText(...$args); $result = Functions::isText(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIsText() public function providerIsText()
@ -196,7 +196,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testIsNonText($expectedResult, ...$args) public function testIsNonText($expectedResult, ...$args)
{ {
$result = Functions::isNonText(...$args); $result = Functions::isNonText(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIsNonText() public function providerIsNonText()
@ -212,7 +212,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testIsEven($expectedResult, ...$args) public function testIsEven($expectedResult, ...$args)
{ {
$result = Functions::isEven(...$args); $result = Functions::isEven(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIsEven() public function providerIsEven()
@ -228,7 +228,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testIsOdd($expectedResult, ...$args) public function testIsOdd($expectedResult, ...$args)
{ {
$result = Functions::isOdd(...$args); $result = Functions::isOdd(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerIsOdd() public function providerIsOdd()
@ -244,7 +244,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testTYPE($expectedResult, ...$args) public function testTYPE($expectedResult, ...$args)
{ {
$result = Functions::TYPE(...$args); $result = Functions::TYPE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerTYPE() public function providerTYPE()
@ -260,7 +260,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
public function testN($expectedResult, ...$args) public function testN($expectedResult, ...$args)
{ {
$result = Functions::n(...$args); $result = Functions::n(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerN() public function providerN()

View File

@ -16,13 +16,13 @@ class LogicalTest extends PHPUnit_Framework_TestCase
public function testTRUE() public function testTRUE()
{ {
$result = Logical::TRUE(); $result = Logical::TRUE();
$this->assertTrue($result); self::assertTrue($result);
} }
public function testFALSE() public function testFALSE()
{ {
$result = Logical::FALSE(); $result = Logical::FALSE();
$this->assertFalse($result); self::assertFalse($result);
} }
/** /**
@ -33,7 +33,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase
public function testAND($expectedResult, ...$args) public function testAND($expectedResult, ...$args)
{ {
$result = Logical::logicalAnd(...$args); $result = Logical::logicalAnd(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerAND() public function providerAND()
@ -49,7 +49,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase
public function testOR($expectedResult, ...$args) public function testOR($expectedResult, ...$args)
{ {
$result = Logical::logicalOr(...$args); $result = Logical::logicalOr(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerOR() public function providerOR()
@ -65,7 +65,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase
public function testNOT($expectedResult, ...$args) public function testNOT($expectedResult, ...$args)
{ {
$result = Logical::NOT(...$args); $result = Logical::NOT(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerNOT() public function providerNOT()
@ -81,7 +81,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase
public function testIF($expectedResult, ...$args) public function testIF($expectedResult, ...$args)
{ {
$result = Logical::statementIf(...$args); $result = Logical::statementIf(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerIF() public function providerIF()
@ -97,7 +97,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase
public function testIFERROR($expectedResult, ...$args) public function testIFERROR($expectedResult, ...$args)
{ {
$result = Logical::IFERROR(...$args); $result = Logical::IFERROR(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerIFERROR() public function providerIFERROR()

View File

@ -25,7 +25,7 @@ class LookupRefTest extends PHPUnit_Framework_TestCase
public function testHLOOKUP($expectedResult, ...$args) public function testHLOOKUP($expectedResult, ...$args)
{ {
$result = LookupRef::HLOOKUP(...$args); $result = LookupRef::HLOOKUP(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerHLOOKUP() public function providerHLOOKUP()
@ -42,7 +42,7 @@ class LookupRefTest extends PHPUnit_Framework_TestCase
public function testVLOOKUP($expectedResult, ...$args) public function testVLOOKUP($expectedResult, ...$args)
{ {
$result = LookupRef::VLOOKUP(...$args); $result = LookupRef::VLOOKUP(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerVLOOKUP() public function providerVLOOKUP()
@ -59,7 +59,7 @@ class LookupRefTest extends PHPUnit_Framework_TestCase
public function testMATCH($expectedResult, ...$args) public function testMATCH($expectedResult, ...$args)
{ {
$result = LookupRef::MATCH(...$args); $result = LookupRef::MATCH(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerMATCH() public function providerMATCH()

View File

@ -22,7 +22,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testATAN2($expectedResult, ...$args) public function testATAN2($expectedResult, ...$args)
{ {
$result = MathTrig::ATAN2(...$args); $result = MathTrig::ATAN2(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerATAN2() public function providerATAN2()
@ -38,7 +38,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testCEILING($expectedResult, ...$args) public function testCEILING($expectedResult, ...$args)
{ {
$result = MathTrig::CEILING(...$args); $result = MathTrig::CEILING(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerCEILING() public function providerCEILING()
@ -54,7 +54,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testCOMBIN($expectedResult, ...$args) public function testCOMBIN($expectedResult, ...$args)
{ {
$result = MathTrig::COMBIN(...$args); $result = MathTrig::COMBIN(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerCOMBIN() public function providerCOMBIN()
@ -70,7 +70,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testEVEN($expectedResult, ...$args) public function testEVEN($expectedResult, ...$args)
{ {
$result = MathTrig::EVEN(...$args); $result = MathTrig::EVEN(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerEVEN() public function providerEVEN()
@ -86,7 +86,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testODD($expectedResult, ...$args) public function testODD($expectedResult, ...$args)
{ {
$result = MathTrig::ODD(...$args); $result = MathTrig::ODD(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerODD() public function providerODD()
@ -102,7 +102,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testFACT($expectedResult, ...$args) public function testFACT($expectedResult, ...$args)
{ {
$result = MathTrig::FACT(...$args); $result = MathTrig::FACT(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerFACT() public function providerFACT()
@ -118,7 +118,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testFACTDOUBLE($expectedResult, ...$args) public function testFACTDOUBLE($expectedResult, ...$args)
{ {
$result = MathTrig::FACTDOUBLE(...$args); $result = MathTrig::FACTDOUBLE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerFACTDOUBLE() public function providerFACTDOUBLE()
@ -134,7 +134,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testFLOOR($expectedResult, ...$args) public function testFLOOR($expectedResult, ...$args)
{ {
$result = MathTrig::FLOOR(...$args); $result = MathTrig::FLOOR(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerFLOOR() public function providerFLOOR()
@ -150,7 +150,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testGCD($expectedResult, ...$args) public function testGCD($expectedResult, ...$args)
{ {
$result = MathTrig::GCD(...$args); $result = MathTrig::GCD(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerGCD() public function providerGCD()
@ -166,7 +166,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testLCM($expectedResult, ...$args) public function testLCM($expectedResult, ...$args)
{ {
$result = MathTrig::LCM(...$args); $result = MathTrig::LCM(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerLCM() public function providerLCM()
@ -182,7 +182,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testINT($expectedResult, ...$args) public function testINT($expectedResult, ...$args)
{ {
$result = MathTrig::INT(...$args); $result = MathTrig::INT(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerINT() public function providerINT()
@ -198,7 +198,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testSIGN($expectedResult, ...$args) public function testSIGN($expectedResult, ...$args)
{ {
$result = MathTrig::SIGN(...$args); $result = MathTrig::SIGN(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerSIGN() public function providerSIGN()
@ -214,7 +214,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testPOWER($expectedResult, ...$args) public function testPOWER($expectedResult, ...$args)
{ {
$result = MathTrig::POWER(...$args); $result = MathTrig::POWER(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerPOWER() public function providerPOWER()
@ -230,7 +230,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testLOG($expectedResult, ...$args) public function testLOG($expectedResult, ...$args)
{ {
$result = MathTrig::logBase(...$args); $result = MathTrig::logBase(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerLOG() public function providerLOG()
@ -246,7 +246,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testMOD($expectedResult, ...$args) public function testMOD($expectedResult, ...$args)
{ {
$result = MathTrig::MOD(...$args); $result = MathTrig::MOD(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerMOD() public function providerMOD()
@ -262,7 +262,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testMDETERM($expectedResult, ...$args) public function testMDETERM($expectedResult, ...$args)
{ {
$result = MathTrig::MDETERM(...$args); $result = MathTrig::MDETERM(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerMDETERM() public function providerMDETERM()
@ -281,7 +281,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$this->markTestIncomplete('TODO: This test should be fixed'); $this->markTestIncomplete('TODO: This test should be fixed');
$result = MathTrig::MINVERSE(...$args); $result = MathTrig::MINVERSE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerMINVERSE() public function providerMINVERSE()
@ -300,7 +300,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
$this->markTestIncomplete('TODO: This test should be fixed'); $this->markTestIncomplete('TODO: This test should be fixed');
$result = MathTrig::MMULT(...$args); $result = MathTrig::MMULT(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerMMULT() public function providerMMULT()
@ -316,7 +316,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testMULTINOMIAL($expectedResult, ...$args) public function testMULTINOMIAL($expectedResult, ...$args)
{ {
$result = MathTrig::MULTINOMIAL(...$args); $result = MathTrig::MULTINOMIAL(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerMULTINOMIAL() public function providerMULTINOMIAL()
@ -334,7 +334,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_VALUE); Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_VALUE);
$result = MathTrig::MROUND(...$args); $result = MathTrig::MROUND(...$args);
Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY); Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_ARRAY);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerMROUND() public function providerMROUND()
@ -350,7 +350,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testPRODUCT($expectedResult, ...$args) public function testPRODUCT($expectedResult, ...$args)
{ {
$result = MathTrig::PRODUCT(...$args); $result = MathTrig::PRODUCT(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerPRODUCT() public function providerPRODUCT()
@ -366,7 +366,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testQUOTIENT($expectedResult, ...$args) public function testQUOTIENT($expectedResult, ...$args)
{ {
$result = MathTrig::QUOTIENT(...$args); $result = MathTrig::QUOTIENT(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerQUOTIENT() public function providerQUOTIENT()
@ -382,7 +382,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testROUNDUP($expectedResult, ...$args) public function testROUNDUP($expectedResult, ...$args)
{ {
$result = MathTrig::ROUNDUP(...$args); $result = MathTrig::ROUNDUP(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerROUNDUP() public function providerROUNDUP()
@ -398,7 +398,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testROUNDDOWN($expectedResult, ...$args) public function testROUNDDOWN($expectedResult, ...$args)
{ {
$result = MathTrig::ROUNDDOWN(...$args); $result = MathTrig::ROUNDDOWN(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerROUNDDOWN() public function providerROUNDDOWN()
@ -414,7 +414,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testSERIESSUM($expectedResult, ...$args) public function testSERIESSUM($expectedResult, ...$args)
{ {
$result = MathTrig::SERIESSUM(...$args); $result = MathTrig::SERIESSUM(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerSERIESSUM() public function providerSERIESSUM()
@ -430,7 +430,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testSUMSQ($expectedResult, ...$args) public function testSUMSQ($expectedResult, ...$args)
{ {
$result = MathTrig::SUMSQ(...$args); $result = MathTrig::SUMSQ(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerSUMSQ() public function providerSUMSQ()
@ -446,7 +446,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testTRUNC($expectedResult, ...$args) public function testTRUNC($expectedResult, ...$args)
{ {
$result = MathTrig::TRUNC(...$args); $result = MathTrig::TRUNC(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerTRUNC() public function providerTRUNC()
@ -462,7 +462,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testROMAN($expectedResult, ...$args) public function testROMAN($expectedResult, ...$args)
{ {
$result = MathTrig::ROMAN(...$args); $result = MathTrig::ROMAN(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerROMAN() public function providerROMAN()
@ -478,7 +478,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testSQRTPI($expectedResult, ...$args) public function testSQRTPI($expectedResult, ...$args)
{ {
$result = MathTrig::SQRTPI(...$args); $result = MathTrig::SQRTPI(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerSQRTPI() public function providerSQRTPI()
@ -494,7 +494,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
public function testSUMIF($expectedResult, ...$args) public function testSUMIF($expectedResult, ...$args)
{ {
$result = MathTrig::SUMIF(...$args); $result = MathTrig::SUMIF(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-12); self::assertEquals($expectedResult, $result, null, 1E-12);
} }
public function providerSUMIF() public function providerSUMIF()

View File

@ -22,7 +22,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testCHAR($expectedResult, ...$args) public function testCHAR($expectedResult, ...$args)
{ {
$result = TextData::CHARACTER(...$args); $result = TextData::CHARACTER(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerCHAR() public function providerCHAR()
@ -38,7 +38,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testCODE($expectedResult, ...$args) public function testCODE($expectedResult, ...$args)
{ {
$result = TextData::ASCIICODE(...$args); $result = TextData::ASCIICODE(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerCODE() public function providerCODE()
@ -54,7 +54,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testCONCATENATE($expectedResult, ...$args) public function testCONCATENATE($expectedResult, ...$args)
{ {
$result = TextData::CONCATENATE(...$args); $result = TextData::CONCATENATE(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerCONCATENATE() public function providerCONCATENATE()
@ -70,7 +70,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testLEFT($expectedResult, ...$args) public function testLEFT($expectedResult, ...$args)
{ {
$result = TextData::LEFT(...$args); $result = TextData::LEFT(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerLEFT() public function providerLEFT()
@ -86,7 +86,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testMID($expectedResult, ...$args) public function testMID($expectedResult, ...$args)
{ {
$result = TextData::MID(...$args); $result = TextData::MID(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerMID() public function providerMID()
@ -102,7 +102,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testRIGHT($expectedResult, ...$args) public function testRIGHT($expectedResult, ...$args)
{ {
$result = TextData::RIGHT(...$args); $result = TextData::RIGHT(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerRIGHT() public function providerRIGHT()
@ -118,7 +118,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testLOWER($expectedResult, ...$args) public function testLOWER($expectedResult, ...$args)
{ {
$result = TextData::LOWERCASE(...$args); $result = TextData::LOWERCASE(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerLOWER() public function providerLOWER()
@ -134,7 +134,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testUPPER($expectedResult, ...$args) public function testUPPER($expectedResult, ...$args)
{ {
$result = TextData::UPPERCASE(...$args); $result = TextData::UPPERCASE(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerUPPER() public function providerUPPER()
@ -150,7 +150,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testPROPER($expectedResult, ...$args) public function testPROPER($expectedResult, ...$args)
{ {
$result = TextData::PROPERCASE(...$args); $result = TextData::PROPERCASE(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerPROPER() public function providerPROPER()
@ -166,7 +166,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testLEN($expectedResult, ...$args) public function testLEN($expectedResult, ...$args)
{ {
$result = TextData::STRINGLENGTH(...$args); $result = TextData::STRINGLENGTH(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerLEN() public function providerLEN()
@ -182,7 +182,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testSEARCH($expectedResult, ...$args) public function testSEARCH($expectedResult, ...$args)
{ {
$result = TextData::SEARCHINSENSITIVE(...$args); $result = TextData::SEARCHINSENSITIVE(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerSEARCH() public function providerSEARCH()
@ -198,7 +198,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testFIND($expectedResult, ...$args) public function testFIND($expectedResult, ...$args)
{ {
$result = TextData::SEARCHSENSITIVE(...$args); $result = TextData::SEARCHSENSITIVE(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerFIND() public function providerFIND()
@ -214,7 +214,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testREPLACE($expectedResult, ...$args) public function testREPLACE($expectedResult, ...$args)
{ {
$result = TextData::REPLACE(...$args); $result = TextData::REPLACE(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerREPLACE() public function providerREPLACE()
@ -230,7 +230,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testSUBSTITUTE($expectedResult, ...$args) public function testSUBSTITUTE($expectedResult, ...$args)
{ {
$result = TextData::SUBSTITUTE(...$args); $result = TextData::SUBSTITUTE(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerSUBSTITUTE() public function providerSUBSTITUTE()
@ -246,7 +246,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testTRIM($expectedResult, ...$args) public function testTRIM($expectedResult, ...$args)
{ {
$result = TextData::TRIMSPACES(...$args); $result = TextData::TRIMSPACES(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerTRIM() public function providerTRIM()
@ -262,7 +262,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testCLEAN($expectedResult, ...$args) public function testCLEAN($expectedResult, ...$args)
{ {
$result = TextData::TRIMNONPRINTABLE(...$args); $result = TextData::TRIMNONPRINTABLE(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerCLEAN() public function providerCLEAN()
@ -278,7 +278,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testDOLLAR($expectedResult, ...$args) public function testDOLLAR($expectedResult, ...$args)
{ {
$result = TextData::DOLLAR(...$args); $result = TextData::DOLLAR(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerDOLLAR() public function providerDOLLAR()
@ -294,7 +294,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testFIXED($expectedResult, ...$args) public function testFIXED($expectedResult, ...$args)
{ {
$result = TextData::FIXEDFORMAT(...$args); $result = TextData::FIXEDFORMAT(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerFIXED() public function providerFIXED()
@ -310,7 +310,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
public function testT($expectedResult, ...$args) public function testT($expectedResult, ...$args)
{ {
$result = TextData::RETURNSTRING(...$args); $result = TextData::RETURNSTRING(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerT() public function providerT()
@ -331,7 +331,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
StringHelper::setCurrencyCode('$'); StringHelper::setCurrencyCode('$');
$result = TextData::TEXTFORMAT(...$args); $result = TextData::TEXTFORMAT(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerTEXT() public function providerTEXT()
@ -351,7 +351,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
StringHelper::setCurrencyCode('$'); StringHelper::setCurrencyCode('$');
$result = TextData::VALUE(...$args); $result = TextData::VALUE(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-8); self::assertEquals($expectedResult, $result, null, 1E-8);
} }
public function providerVALUE() public function providerVALUE()

View File

@ -24,11 +24,11 @@ class CalculationTest extends PHPUnit_Framework_TestCase
{ {
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL); Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
$resultExcel = Calculation::getInstance()->_calculateFormulaValue($formula); $resultExcel = Calculation::getInstance()->_calculateFormulaValue($formula);
$this->assertEquals($expectedResultExcel, $resultExcel, 'should be Excel compatible'); self::assertEquals($expectedResultExcel, $resultExcel, 'should be Excel compatible');
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE); Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
$resultOpenOffice = Calculation::getInstance()->_calculateFormulaValue($formula); $resultOpenOffice = Calculation::getInstance()->_calculateFormulaValue($formula);
$this->assertEquals($expectedResultOpenOffice, $resultOpenOffice, 'should be OpenOffice compatible'); self::assertEquals($expectedResultOpenOffice, $resultOpenOffice, 'should be OpenOffice compatible');
} }
public function providerBinaryComparisonOperation() public function providerBinaryComparisonOperation()
@ -45,7 +45,7 @@ class CalculationTest extends PHPUnit_Framework_TestCase
*/ */
public function testGetFunctions($category, $functionCall, $argumentCount) public function testGetFunctions($category, $functionCall, $argumentCount)
{ {
$this->assertInternalType('callable', $functionCall); self::assertInternalType('callable', $functionCall);
} }
public function providerGetFunctions() public function providerGetFunctions()
@ -56,10 +56,10 @@ class CalculationTest extends PHPUnit_Framework_TestCase
public function testIsImplemented() public function testIsImplemented()
{ {
$calculation = Calculation::getInstance(); $calculation = Calculation::getInstance();
$this->assertFalse($calculation->isImplemented('non-existing-function')); self::assertFalse($calculation->isImplemented('non-existing-function'));
$this->assertFalse($calculation->isImplemented('AREAS')); self::assertFalse($calculation->isImplemented('AREAS'));
$this->assertTrue($calculation->isImplemented('coUNt')); self::assertTrue($calculation->isImplemented('coUNt'));
$this->assertTrue($calculation->isImplemented('abs')); self::assertTrue($calculation->isImplemented('abs'));
} }
/** /**
@ -70,7 +70,7 @@ class CalculationTest extends PHPUnit_Framework_TestCase
public function testCanLoadAllSupportedLocales($locale) public function testCanLoadAllSupportedLocales($locale)
{ {
$calculation = Calculation::getInstance(); $calculation = Calculation::getInstance();
$this->assertTrue($calculation->setLocale($locale)); self::assertTrue($calculation->setLocale($locale));
} }
public function providerCanLoadAllSupportedLocales() public function providerCanLoadAllSupportedLocales()

View File

@ -74,6 +74,6 @@ class AdvancedValueBinderTest extends PHPUnit_Framework_TestCase
$binder = new AdvancedValueBinder(); $binder = new AdvancedValueBinder();
$binder->bindValue($cell, $value); $binder->bindValue($cell, $value);
$this->assertEquals($valueBinded, $cell->getValue()); self::assertEquals($valueBinded, $cell->getValue());
} }
} }

View File

@ -10,8 +10,8 @@ class DataTypeTest extends PHPUnit_Framework_TestCase
public function testGetErrorCodes() public function testGetErrorCodes()
{ {
$result = DataType::getErrorCodes(); $result = DataType::getErrorCodes();
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
$this->assertGreaterThan(0, count($result)); self::assertGreaterThan(0, count($result));
$this->assertArrayHasKey('#NULL!', $result); self::assertArrayHasKey('#NULL!', $result);
} }
} }

View File

@ -35,7 +35,7 @@ class DefaultValueBinderTest extends PHPUnit_Framework_TestCase
$this->createCellStub(); $this->createCellStub();
$binder = new DefaultValueBinder(); $binder = new DefaultValueBinder();
$result = $binder->bindValue($this->cellStub, $value); $result = $binder->bindValue($this->cellStub, $value);
$this->assertTrue($result); self::assertTrue($result);
} }
public function binderProvider() public function binderProvider()
@ -64,7 +64,7 @@ class DefaultValueBinderTest extends PHPUnit_Framework_TestCase
public function testDataTypeForValue($expectedResult, ...$args) public function testDataTypeForValue($expectedResult, ...$args)
{ {
$result = DefaultValueBinder::dataTypeForValue(...$args); $result = DefaultValueBinder::dataTypeForValue(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerDataTypeForValue() public function providerDataTypeForValue()
@ -79,6 +79,6 @@ class DefaultValueBinderTest extends PHPUnit_Framework_TestCase
$expectedResult = DataType::TYPE_INLINE; $expectedResult = DataType::TYPE_INLINE;
$result = DefaultValueBinder::dataTypeForValue($objRichText); $result = DefaultValueBinder::dataTypeForValue($objRichText);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
} }

View File

@ -14,7 +14,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
$testInstance = new Hyperlink($urlValue); $testInstance = new Hyperlink($urlValue);
$result = $testInstance->getUrl(); $result = $testInstance->getUrl();
$this->assertEquals($urlValue, $result); self::assertEquals($urlValue, $result);
} }
public function testSetUrl() public function testSetUrl()
@ -24,10 +24,10 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
$testInstance = new Hyperlink($initialUrlValue); $testInstance = new Hyperlink($initialUrlValue);
$result = $testInstance->setUrl($newUrlValue); $result = $testInstance->setUrl($newUrlValue);
$this->assertTrue($result instanceof Hyperlink); self::assertTrue($result instanceof Hyperlink);
$result = $testInstance->getUrl(); $result = $testInstance->getUrl();
$this->assertEquals($newUrlValue, $result); self::assertEquals($newUrlValue, $result);
} }
public function testGetTooltip() public function testGetTooltip()
@ -37,7 +37,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
$testInstance = new Hyperlink(null, $tooltipValue); $testInstance = new Hyperlink(null, $tooltipValue);
$result = $testInstance->getTooltip(); $result = $testInstance->getTooltip();
$this->assertEquals($tooltipValue, $result); self::assertEquals($tooltipValue, $result);
} }
public function testSetTooltip() public function testSetTooltip()
@ -47,10 +47,10 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
$testInstance = new Hyperlink(null, $initialTooltipValue); $testInstance = new Hyperlink(null, $initialTooltipValue);
$result = $testInstance->setTooltip($newTooltipValue); $result = $testInstance->setTooltip($newTooltipValue);
$this->assertTrue($result instanceof Hyperlink); self::assertTrue($result instanceof Hyperlink);
$result = $testInstance->getTooltip(); $result = $testInstance->getTooltip();
$this->assertEquals($newTooltipValue, $result); self::assertEquals($newTooltipValue, $result);
} }
public function testIsInternal() public function testIsInternal()
@ -60,11 +60,11 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
$testInstance = new Hyperlink($initialUrlValue); $testInstance = new Hyperlink($initialUrlValue);
$result = $testInstance->isInternal(); $result = $testInstance->isInternal();
$this->assertFalse($result); self::assertFalse($result);
$testInstance->setUrl($newUrlValue); $testInstance->setUrl($newUrlValue);
$result = $testInstance->isInternal(); $result = $testInstance->isInternal();
$this->assertTrue($result); self::assertTrue($result);
} }
public function testGetHashCode() public function testGetHashCode()
@ -76,6 +76,6 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
$testInstance = new Hyperlink($urlValue, $tooltipValue); $testInstance = new Hyperlink($urlValue, $tooltipValue);
$result = $testInstance->getHashCode(); $result = $testInstance->getHashCode();
$this->assertEquals($initialExpectedHash, $result); self::assertEquals($initialExpectedHash, $result);
} }
} }

View File

@ -16,7 +16,7 @@ class CellTest extends PHPUnit_Framework_TestCase
public function testColumnIndexFromString($expectedResult, ...$args) public function testColumnIndexFromString($expectedResult, ...$args)
{ {
$result = Cell::columnIndexFromString(...$args); $result = Cell::columnIndexFromString(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerColumnString() public function providerColumnString()
@ -30,8 +30,8 @@ class CellTest extends PHPUnit_Framework_TestCase
try { try {
Cell::columnIndexFromString($cellAddress); Cell::columnIndexFromString($cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); self::assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Column string index can not be longer than 3 characters'); self::assertEquals($e->getMessage(), 'Column string index can not be longer than 3 characters');
return; return;
} }
@ -44,8 +44,8 @@ class CellTest extends PHPUnit_Framework_TestCase
try { try {
Cell::columnIndexFromString($cellAddress); Cell::columnIndexFromString($cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); self::assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Column string index can not be empty'); self::assertEquals($e->getMessage(), 'Column string index can not be empty');
return; return;
} }
@ -60,7 +60,7 @@ class CellTest extends PHPUnit_Framework_TestCase
public function testStringFromColumnIndex($expectedResult, ...$args) public function testStringFromColumnIndex($expectedResult, ...$args)
{ {
$result = Cell::stringFromColumnIndex(...$args); $result = Cell::stringFromColumnIndex(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerColumnIndex() public function providerColumnIndex()
@ -76,7 +76,7 @@ class CellTest extends PHPUnit_Framework_TestCase
public function testCoordinateFromString($expectedResult, ...$args) public function testCoordinateFromString($expectedResult, ...$args)
{ {
$result = Cell::coordinateFromString(...$args); $result = Cell::coordinateFromString(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerCoordinates() public function providerCoordinates()
@ -90,8 +90,8 @@ class CellTest extends PHPUnit_Framework_TestCase
try { try {
Cell::coordinateFromString($cellAddress); Cell::coordinateFromString($cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); self::assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); self::assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
return; return;
} }
@ -104,8 +104,8 @@ class CellTest extends PHPUnit_Framework_TestCase
try { try {
Cell::coordinateFromString($cellAddress); Cell::coordinateFromString($cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); self::assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Cell coordinate can not be zero-length string'); self::assertEquals($e->getMessage(), 'Cell coordinate can not be zero-length string');
return; return;
} }
@ -118,8 +118,8 @@ class CellTest extends PHPUnit_Framework_TestCase
try { try {
Cell::coordinateFromString($cellAddress); Cell::coordinateFromString($cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); self::assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Invalid cell coordinate ' . $cellAddress); self::assertEquals($e->getMessage(), 'Invalid cell coordinate ' . $cellAddress);
return; return;
} }
@ -134,7 +134,7 @@ class CellTest extends PHPUnit_Framework_TestCase
public function testAbsoluteCoordinateFromString($expectedResult, ...$args) public function testAbsoluteCoordinateFromString($expectedResult, ...$args)
{ {
$result = Cell::absoluteCoordinate(...$args); $result = Cell::absoluteCoordinate(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerAbsoluteCoordinates() public function providerAbsoluteCoordinates()
@ -148,8 +148,8 @@ class CellTest extends PHPUnit_Framework_TestCase
try { try {
Cell::absoluteCoordinate($cellAddress); Cell::absoluteCoordinate($cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); self::assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); self::assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
return; return;
} }
@ -164,7 +164,7 @@ class CellTest extends PHPUnit_Framework_TestCase
public function testAbsoluteReferenceFromString($expectedResult, ...$args) public function testAbsoluteReferenceFromString($expectedResult, ...$args)
{ {
$result = Cell::absoluteReference(...$args); $result = Cell::absoluteReference(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerAbsoluteReferences() public function providerAbsoluteReferences()
@ -178,8 +178,8 @@ class CellTest extends PHPUnit_Framework_TestCase
try { try {
Cell::absoluteReference($cellAddress); Cell::absoluteReference($cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); self::assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); self::assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
return; return;
} }
@ -196,9 +196,9 @@ class CellTest extends PHPUnit_Framework_TestCase
$result = Cell::splitRange(...$args); $result = Cell::splitRange(...$args);
foreach ($result as $key => $split) { foreach ($result as $key => $split) {
if (!is_array($expectedResult[$key])) { if (!is_array($expectedResult[$key])) {
$this->assertEquals($expectedResult[$key], $split[0]); self::assertEquals($expectedResult[$key], $split[0]);
} else { } else {
$this->assertEquals($expectedResult[$key], $split); self::assertEquals($expectedResult[$key], $split);
} }
} }
} }
@ -216,7 +216,7 @@ class CellTest extends PHPUnit_Framework_TestCase
public function testBuildRange($expectedResult, ...$args) public function testBuildRange($expectedResult, ...$args)
{ {
$result = Cell::buildRange(...$args); $result = Cell::buildRange(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerBuildRange() public function providerBuildRange()
@ -245,7 +245,7 @@ class CellTest extends PHPUnit_Framework_TestCase
public function testRangeBoundaries($expectedResult, ...$args) public function testRangeBoundaries($expectedResult, ...$args)
{ {
$result = Cell::rangeBoundaries(...$args); $result = Cell::rangeBoundaries(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerRangeBoundaries() public function providerRangeBoundaries()
@ -261,7 +261,7 @@ class CellTest extends PHPUnit_Framework_TestCase
public function testRangeDimension($expectedResult, ...$args) public function testRangeDimension($expectedResult, ...$args)
{ {
$result = Cell::rangeDimension(...$args); $result = Cell::rangeDimension(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerRangeDimension() public function providerRangeDimension()
@ -277,7 +277,7 @@ class CellTest extends PHPUnit_Framework_TestCase
public function testGetRangeBoundaries($expectedResult, ...$args) public function testGetRangeBoundaries($expectedResult, ...$args)
{ {
$result = Cell::getRangeBoundaries(...$args); $result = Cell::getRangeBoundaries(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerGetRangeBoundaries() public function providerGetRangeBoundaries()
@ -293,7 +293,7 @@ class CellTest extends PHPUnit_Framework_TestCase
public function testExtractAllCellReferencesInRange($expectedResult, ...$args) public function testExtractAllCellReferencesInRange($expectedResult, ...$args)
{ {
$result = Cell::extractAllCellReferencesInRange(...$args); $result = Cell::extractAllCellReferencesInRange(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerExtractAllCellReferencesInRange() public function providerExtractAllCellReferencesInRange()
@ -309,7 +309,7 @@ class CellTest extends PHPUnit_Framework_TestCase
public function testMergeRangesInCollection($expectedResult, ...$args) public function testMergeRangesInCollection($expectedResult, ...$args)
{ {
$result = Cell::mergeRangesInCollection(...$args); $result = Cell::mergeRangesInCollection(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerMergeRangesInCollection() public function providerMergeRangesInCollection()

View File

@ -19,7 +19,7 @@ class DataSeriesValuesTest extends PHPUnit_Framework_TestCase
foreach ($dataTypeValues as $dataTypeValue) { foreach ($dataTypeValues as $dataTypeValue) {
$result = $testInstance->setDataType($dataTypeValue); $result = $testInstance->setDataType($dataTypeValue);
$this->assertTrue($result instanceof DataSeriesValues); self::assertTrue($result instanceof DataSeriesValues);
} }
} }
@ -30,7 +30,7 @@ class DataSeriesValuesTest extends PHPUnit_Framework_TestCase
try { try {
$testInstance->setDataType('BOOLEAN'); $testInstance->setDataType('BOOLEAN');
} catch (Exception $e) { } catch (Exception $e) {
$this->assertEquals($e->getMessage(), 'Invalid datatype for chart data series values'); self::assertEquals($e->getMessage(), 'Invalid datatype for chart data series values');
return; return;
} }
@ -45,6 +45,6 @@ class DataSeriesValuesTest extends PHPUnit_Framework_TestCase
$testInstance->setDataType($dataTypeValue); $testInstance->setDataType($dataTypeValue);
$result = $testInstance->getDataType(); $result = $testInstance->getDataType();
$this->assertEquals($dataTypeValue, $result); self::assertEquals($dataTypeValue, $result);
} }
} }

View File

@ -14,7 +14,7 @@ class LayoutTest extends PHPUnit_Framework_TestCase
$testInstance = new Layout(); $testInstance = new Layout();
$result = $testInstance->setLayoutTarget($LayoutTargetValue); $result = $testInstance->setLayoutTarget($LayoutTargetValue);
$this->assertTrue($result instanceof Layout); self::assertTrue($result instanceof Layout);
} }
public function testGetLayoutTarget() public function testGetLayoutTarget()
@ -25,6 +25,6 @@ class LayoutTest extends PHPUnit_Framework_TestCase
$setValue = $testInstance->setLayoutTarget($LayoutTargetValue); $setValue = $testInstance->setLayoutTarget($LayoutTargetValue);
$result = $testInstance->getLayoutTarget(); $result = $testInstance->getLayoutTarget();
$this->assertEquals($LayoutTargetValue, $result); self::assertEquals($LayoutTargetValue, $result);
} }
} }

View File

@ -21,7 +21,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
foreach ($positionValues as $positionValue) { foreach ($positionValues as $positionValue) {
$result = $testInstance->setPosition($positionValue); $result = $testInstance->setPosition($positionValue);
$this->assertTrue($result); self::assertTrue($result);
} }
} }
@ -30,10 +30,10 @@ class LegendTest extends PHPUnit_Framework_TestCase
$testInstance = new Legend(); $testInstance = new Legend();
$result = $testInstance->setPosition('BottomLeft'); $result = $testInstance->setPosition('BottomLeft');
$this->assertFalse($result); self::assertFalse($result);
// Ensure that value is unchanged // Ensure that value is unchanged
$result = $testInstance->getPosition(); $result = $testInstance->getPosition();
$this->assertEquals(Legend::POSITION_RIGHT, $result); self::assertEquals(Legend::POSITION_RIGHT, $result);
} }
public function testGetPosition() public function testGetPosition()
@ -44,7 +44,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
$setValue = $testInstance->setPosition($PositionValue); $setValue = $testInstance->setPosition($PositionValue);
$result = $testInstance->getPosition(); $result = $testInstance->getPosition();
$this->assertEquals($PositionValue, $result); self::assertEquals($PositionValue, $result);
} }
public function testSetPositionXL() public function testSetPositionXL()
@ -62,7 +62,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
foreach ($positionValues as $positionValue) { foreach ($positionValues as $positionValue) {
$result = $testInstance->setPositionXL($positionValue); $result = $testInstance->setPositionXL($positionValue);
$this->assertTrue($result); self::assertTrue($result);
} }
} }
@ -71,10 +71,10 @@ class LegendTest extends PHPUnit_Framework_TestCase
$testInstance = new Legend(); $testInstance = new Legend();
$result = $testInstance->setPositionXL(999); $result = $testInstance->setPositionXL(999);
$this->assertFalse($result); self::assertFalse($result);
// Ensure that value is unchanged // Ensure that value is unchanged
$result = $testInstance->getPositionXL(); $result = $testInstance->getPositionXL();
$this->assertEquals(Legend::XL_LEGEND_POSITION_RIGHT, $result); self::assertEquals(Legend::XL_LEGEND_POSITION_RIGHT, $result);
} }
public function testGetPositionXL() public function testGetPositionXL()
@ -85,7 +85,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
$setValue = $testInstance->setPositionXL($PositionValue); $setValue = $testInstance->setPositionXL($PositionValue);
$result = $testInstance->getPositionXL(); $result = $testInstance->getPositionXL();
$this->assertEquals($PositionValue, $result); self::assertEquals($PositionValue, $result);
} }
public function testSetOverlay() public function testSetOverlay()
@ -99,7 +99,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
foreach ($overlayValues as $overlayValue) { foreach ($overlayValues as $overlayValue) {
$result = $testInstance->setOverlay($overlayValue); $result = $testInstance->setOverlay($overlayValue);
$this->assertTrue($result); self::assertTrue($result);
} }
} }
@ -108,10 +108,10 @@ class LegendTest extends PHPUnit_Framework_TestCase
$testInstance = new Legend(); $testInstance = new Legend();
$result = $testInstance->setOverlay('INVALID'); $result = $testInstance->setOverlay('INVALID');
$this->assertFalse($result); self::assertFalse($result);
$result = $testInstance->getOverlay(); $result = $testInstance->getOverlay();
$this->assertFalse($result); self::assertFalse($result);
} }
public function testGetOverlay() public function testGetOverlay()
@ -122,6 +122,6 @@ class LegendTest extends PHPUnit_Framework_TestCase
$setValue = $testInstance->setOverlay($OverlayValue); $setValue = $testInstance->setOverlay($OverlayValue);
$result = $testInstance->getOverlay(); $result = $testInstance->getOverlay();
$this->assertEquals($OverlayValue, $result); self::assertEquals($OverlayValue, $result);
} }
} }

View File

@ -18,49 +18,49 @@ class CellsTest extends PHPUnit_Framework_TestCase
$collection = $sheet->getCellCollection(); $collection = $sheet->getCellCollection();
// Assert empty state // Assert empty state
$this->assertEquals([], $collection->getCoordinates(), 'cell list should be empty'); self::assertEquals([], $collection->getCoordinates(), 'cell list should be empty');
$this->assertEquals([], $collection->getSortedCoordinates(), 'sorted cell list should be empty'); self::assertEquals([], $collection->getSortedCoordinates(), 'sorted cell list should be empty');
$this->assertNull($collection->get('B2'), 'getting non-existing cell must return null'); self::assertNull($collection->get('B2'), 'getting non-existing cell must return null');
$this->assertFalse($collection->has('B2'), 'non-existing cell should be non-existent'); self::assertFalse($collection->has('B2'), 'non-existing cell should be non-existent');
// Add one cell // Add one cell
$cell1 = $sheet->getCell('B2'); $cell1 = $sheet->getCell('B2');
$this->assertSame($cell1, $collection->add('B2', $cell1), 'adding a cell should return the cell'); self::assertSame($cell1, $collection->add('B2', $cell1), 'adding a cell should return the cell');
// Assert cell presence // Assert cell presence
$this->assertEquals(['B2'], $collection->getCoordinates(), 'cell list should contains the cell'); self::assertEquals(['B2'], $collection->getCoordinates(), 'cell list should contains the cell');
$this->assertEquals(['B2'], $collection->getSortedCoordinates(), 'sorted cell list contains the cell'); self::assertEquals(['B2'], $collection->getSortedCoordinates(), 'sorted cell list contains the cell');
$this->assertSame($cell1, $collection->get('B2'), 'should get exact same object'); self::assertSame($cell1, $collection->get('B2'), 'should get exact same object');
$this->assertTrue($collection->has('B2'), 'cell should exists'); self::assertTrue($collection->has('B2'), 'cell should exists');
// Add a second cell // Add a second cell
$cell2 = $sheet->getCell('A1'); $cell2 = $sheet->getCell('A1');
$this->assertSame($cell2, $collection->add('A1', $cell2), 'adding a second cell should return the cell'); self::assertSame($cell2, $collection->add('A1', $cell2), 'adding a second cell should return the cell');
$this->assertEquals(['B2', 'A1'], $collection->getCoordinates(), 'cell list should contains the cell'); self::assertEquals(['B2', 'A1'], $collection->getCoordinates(), 'cell list should contains the cell');
$this->assertEquals(['A1', 'B2'], $collection->getSortedCoordinates(), 'sorted cell list contains the cell'); self::assertEquals(['A1', 'B2'], $collection->getSortedCoordinates(), 'sorted cell list contains the cell');
// Assert collection copy // Assert collection copy
$sheet2 = $spreadsheet->createSheet(); $sheet2 = $spreadsheet->createSheet();
$collection2 = $collection->cloneCellCollection($sheet2); $collection2 = $collection->cloneCellCollection($sheet2);
$this->assertTrue($collection2->has('A1')); self::assertTrue($collection2->has('A1'));
$copiedCell2 = $collection2->get('A1'); $copiedCell2 = $collection2->get('A1');
$this->assertNotSame($cell2, $copiedCell2, 'copied cell should not be the same object any more'); self::assertNotSame($cell2, $copiedCell2, 'copied cell should not be the same object any more');
$this->assertSame($collection2, $copiedCell2->getParent(), 'copied cell should be owned by the copied collection'); self::assertSame($collection2, $copiedCell2->getParent(), 'copied cell should be owned by the copied collection');
$this->assertSame('A1', $copiedCell2->getCoordinate(), 'copied cell should keep attributes'); self::assertSame('A1', $copiedCell2->getCoordinate(), 'copied cell should keep attributes');
// Assert deletion // Assert deletion
$collection->delete('B2'); $collection->delete('B2');
$this->assertFalse($collection->has('B2'), 'cell should have been deleted'); self::assertFalse($collection->has('B2'), 'cell should have been deleted');
$this->assertEquals(['A1'], $collection->getCoordinates(), 'cell list should contains the cell'); self::assertEquals(['A1'], $collection->getCoordinates(), 'cell list should contains the cell');
// Assert update // Assert update
$cell2 = $sheet->getCell('A1'); $cell2 = $sheet->getCell('A1');
$this->assertSame($sheet->getCellCollection(), $collection); self::assertSame($sheet->getCellCollection(), $collection);
$this->assertSame($cell2, $collection->update($cell2), 'should update existing cell'); self::assertSame($cell2, $collection->update($cell2), 'should update existing cell');
$cell3 = $sheet->getCell('C3'); $cell3 = $sheet->getCell('C3');
$this->assertSame($cell3, $collection->update($cell3), 'should silently add non-existing cell'); self::assertSame($cell3, $collection->update($cell3), 'should silently add non-existing cell');
$this->assertEquals(['A1', 'C3'], $collection->getCoordinates(), 'cell list should contains the cell'); self::assertEquals(['A1', 'C3'], $collection->getCoordinates(), 'cell list should contains the cell');
} }
public function testCacheLastCell() public function testCacheLastCell()
@ -70,7 +70,7 @@ class CellsTest extends PHPUnit_Framework_TestCase
$sheet = $workbook->getActiveSheet(); $sheet = $workbook->getActiveSheet();
$sheet->setCellValue('A1', 1); $sheet->setCellValue('A1', 1);
$sheet->setCellValue('A2', 2); $sheet->setCellValue('A2', 2);
$this->assertEquals($cells, $sheet->getCoordinates(), 'list should include last added cell'); self::assertEquals($cells, $sheet->getCoordinates(), 'list should include last added cell');
} }
public function testCanGetCellAfterAnotherIsDeleted() public function testCanGetCellAfterAnotherIsDeleted()
@ -82,7 +82,7 @@ class CellsTest extends PHPUnit_Framework_TestCase
$sheet->setCellValue('A2', 1); $sheet->setCellValue('A2', 1);
$collection->delete('A1'); $collection->delete('A1');
$sheet->setCellValue('A3', 1); $sheet->setCellValue('A3', 1);
$this->assertNotNull($collection->get('A2'), 'should be able to get back the cell even when another cell was deleted while this one was the current one'); self::assertNotNull($collection->get('A2'), 'should be able to get back the cell even when another cell was deleted while this one was the current one');
} }
/** /**

View File

@ -13,7 +13,7 @@ class MigratorTest extends PHPUnit_Framework_TestCase
foreach ($migrator->getMapping() as $classname) { foreach ($migrator->getMapping() as $classname) {
if (substr_count($classname, '\\')) { if (substr_count($classname, '\\')) {
$this->assertTrue(class_exists($classname) || interface_exists($classname), 'mapping is wrong, class does not exists in project: ' . $classname); self::assertTrue(class_exists($classname) || interface_exists($classname), 'mapping is wrong, class does not exists in project: ' . $classname);
} }
} }
} }

View File

@ -16,7 +16,7 @@ class IOFactoryTest extends PHPUnit_Framework_TestCase
public function testIdentify($file, $expected) public function testIdentify($file, $expected)
{ {
$actual = IOFactory::identify($file); $actual = IOFactory::identify($file);
$this->assertSame($expected, $actual); self::assertSame($expected, $actual);
} }
public function providerIdentify() public function providerIdentify()

View File

@ -25,20 +25,20 @@ class CsvTest extends PHPUnit_Framework_TestCase
$reader = new ReaderCsv(); $reader = new ReaderCsv();
$reloadedSpreadsheet = $reader->load($filename); $reloadedSpreadsheet = $reader->load($filename);
$actual = $reloadedSpreadsheet->getActiveSheet()->getCell('A1')->getCalculatedValue(); $actual = $reloadedSpreadsheet->getActiveSheet()->getCell('A1')->getCalculatedValue();
$this->assertSame($value, $actual, 'should be able to write and read strings with multiples quotes'); self::assertSame($value, $actual, 'should be able to write and read strings with multiples quotes');
} }
public function testDelimiterDetection() public function testDelimiterDetection()
{ {
$reader = new ReaderCsv(); $reader = new ReaderCsv();
$this->assertNull($reader->getDelimiter()); self::assertNull($reader->getDelimiter());
$filename = __DIR__ . '/../../data/Reader/CSV/semicolon_separated.csv'; $filename = __DIR__ . '/../../data/Reader/CSV/semicolon_separated.csv';
$spreadsheet = $reader->load($filename); $spreadsheet = $reader->load($filename);
$this->assertSame(';', $reader->getDelimiter(), 'should be able to infer the delimiter'); self::assertSame(';', $reader->getDelimiter(), 'should be able to infer the delimiter');
$actual = $spreadsheet->getActiveSheet()->getCell('C2')->getValue(); $actual = $spreadsheet->getActiveSheet()->getCell('C2')->getValue();
$this->assertSame('25,5', $actual, 'should be able to retrieve values with commas'); self::assertSame('25,5', $actual, 'should be able to retrieve values with commas');
} }
} }

View File

@ -11,6 +11,6 @@ class HTMLTest extends PHPUnit_Framework_TestCase
{ {
$filename = __DIR__ . '/../../data/Reader/HTML/csv_with_angle_bracket.csv'; $filename = __DIR__ . '/../../data/Reader/HTML/csv_with_angle_bracket.csv';
$reader = new Html(); $reader = new Html();
$this->assertFalse($reader->canRead($filename)); self::assertFalse($reader->canRead($filename));
} }
} }

View File

@ -64,7 +64,7 @@ class OdsTest extends PHPUnit_Framework_TestCase
// Test "listWorksheetNames" method // Test "listWorksheetNames" method
$this->assertEquals([ self::assertEquals([
'Sheet1', 'Sheet1',
'Second Sheet', 'Second Sheet',
], $reader->listWorksheetNames($filename)); ], $reader->listWorksheetNames($filename));
@ -74,15 +74,15 @@ class OdsTest extends PHPUnit_Framework_TestCase
{ {
$spreadsheet = $this->loadDataFile(); $spreadsheet = $this->loadDataFile();
$this->assertInstanceOf('PhpOffice\PhpSpreadsheet\Spreadsheet', $spreadsheet); self::assertInstanceOf('PhpOffice\PhpSpreadsheet\Spreadsheet', $spreadsheet);
$this->assertEquals(2, $spreadsheet->getSheetCount()); self::assertEquals(2, $spreadsheet->getSheetCount());
$firstSheet = $spreadsheet->getSheet(0); $firstSheet = $spreadsheet->getSheet(0);
$this->assertInstanceOf('PhpOffice\PhpSpreadsheet\Worksheet', $firstSheet); self::assertInstanceOf('PhpOffice\PhpSpreadsheet\Worksheet', $firstSheet);
$secondSheet = $spreadsheet->getSheet(1); $secondSheet = $spreadsheet->getSheet(1);
$this->assertInstanceOf('PhpOffice\PhpSpreadsheet\Worksheet', $secondSheet); self::assertInstanceOf('PhpOffice\PhpSpreadsheet\Worksheet', $secondSheet);
} }
public function testReadValueAndComments() public function testReadValueAndComments()
@ -91,45 +91,45 @@ class OdsTest extends PHPUnit_Framework_TestCase
$firstSheet = $spreadsheet->getSheet(0); $firstSheet = $spreadsheet->getSheet(0);
$this->assertEquals(29, $firstSheet->getHighestRow()); self::assertEquals(29, $firstSheet->getHighestRow());
$this->assertEquals('N', $firstSheet->getHighestColumn()); self::assertEquals('N', $firstSheet->getHighestColumn());
// Simple cell value // Simple cell value
$this->assertEquals('Test String 1', $firstSheet->getCell('A1')->getValue()); self::assertEquals('Test String 1', $firstSheet->getCell('A1')->getValue());
// Merged cell // Merged cell
$this->assertEquals('BOX', $firstSheet->getCell('B18')->getValue()); self::assertEquals('BOX', $firstSheet->getCell('B18')->getValue());
// Comments/Annotations // Comments/Annotations
$this->assertEquals( self::assertEquals(
'Test for a simple colour-formatted string', 'Test for a simple colour-formatted string',
$firstSheet->getComment('A1')->getText()->getPlainText() $firstSheet->getComment('A1')->getText()->getPlainText()
); );
// Data types // Data types
$this->assertEquals(DataType::TYPE_STRING, $firstSheet->getCell('A1')->getDataType()); self::assertEquals(DataType::TYPE_STRING, $firstSheet->getCell('A1')->getDataType());
$this->assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('B1')->getDataType()); // Int self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('B1')->getDataType()); // Int
$this->assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('B6')->getDataType()); // Float self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('B6')->getDataType()); // Float
$this->assertEquals(1.23, $firstSheet->getCell('B6')->getValue()); self::assertEquals(1.23, $firstSheet->getCell('B6')->getValue());
$this->assertEquals(0, $firstSheet->getCell('G10')->getValue()); self::assertEquals(0, $firstSheet->getCell('G10')->getValue());
$this->assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A10')->getDataType()); // Date self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A10')->getDataType()); // Date
$this->assertEquals(22269.0, $firstSheet->getCell('A10')->getValue()); self::assertEquals(22269.0, $firstSheet->getCell('A10')->getValue());
$this->assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A13')->getDataType()); // Time self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A13')->getDataType()); // Time
$this->assertEquals(25569.0625, $firstSheet->getCell('A13')->getValue()); self::assertEquals(25569.0625, $firstSheet->getCell('A13')->getValue());
$this->assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A15')->getDataType()); // Date + Time self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A15')->getDataType()); // Date + Time
$this->assertEquals(22269.0625, $firstSheet->getCell('A15')->getValue()); self::assertEquals(22269.0625, $firstSheet->getCell('A15')->getValue());
$this->assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A11')->getDataType()); // Fraction self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A11')->getDataType()); // Fraction
$this->assertEquals(DataType::TYPE_BOOL, $firstSheet->getCell('D6')->getDataType()); self::assertEquals(DataType::TYPE_BOOL, $firstSheet->getCell('D6')->getDataType());
$this->assertTrue($firstSheet->getCell('D6')->getValue()); self::assertTrue($firstSheet->getCell('D6')->getValue());
$this->assertEquals(DataType::TYPE_FORMULA, $firstSheet->getCell('C6')->getDataType()); // Formula self::assertEquals(DataType::TYPE_FORMULA, $firstSheet->getCell('C6')->getDataType()); // Formula
$this->assertEquals('=TRUE()', $firstSheet->getCell('C6')->getValue()); // Formula self::assertEquals('=TRUE()', $firstSheet->getCell('C6')->getValue()); // Formula
/* /*
* Percentage, Currency * Percentage, Currency
@ -139,17 +139,17 @@ class OdsTest extends PHPUnit_Framework_TestCase
$firstSheet = $spreadsheet->getSheet(0); $firstSheet = $spreadsheet->getSheet(0);
$this->assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A1')->getDataType()); // Percentage (10%) self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A1')->getDataType()); // Percentage (10%)
$this->assertEquals(0.1, $firstSheet->getCell('A1')->getValue()); self::assertEquals(0.1, $firstSheet->getCell('A1')->getValue());
$this->assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A2')->getDataType()); // Percentage (10.00%) self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A2')->getDataType()); // Percentage (10.00%)
$this->assertEquals(0.1, $firstSheet->getCell('A2')->getValue()); self::assertEquals(0.1, $firstSheet->getCell('A2')->getValue());
$this->assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A4')->getDataType()); // Currency (€10.00) self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A4')->getDataType()); // Currency (€10.00)
$this->assertEquals(10, $firstSheet->getCell('A4')->getValue()); self::assertEquals(10, $firstSheet->getCell('A4')->getValue());
$this->assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A5')->getDataType()); // Currency ($20) self::assertEquals(DataType::TYPE_NUMERIC, $firstSheet->getCell('A5')->getDataType()); // Currency ($20)
$this->assertEquals(20, $firstSheet->getCell('A5')->getValue()); self::assertEquals(20, $firstSheet->getCell('A5')->getValue());
} }
public function testReadColors() public function testReadColors()
@ -161,9 +161,9 @@ class OdsTest extends PHPUnit_Framework_TestCase
$style = $firstSheet->getCell('K3')->getStyle(); $style = $firstSheet->getCell('K3')->getStyle();
$this->assertEquals('none', $style->getFill()->getFillType()); self::assertEquals('none', $style->getFill()->getFillType());
$this->assertEquals('FFFFFFFF', $style->getFill()->getStartColor()->getARGB()); self::assertEquals('FFFFFFFF', $style->getFill()->getStartColor()->getARGB());
$this->assertEquals('FF000000', $style->getFill()->getEndColor()->getARGB()); self::assertEquals('FF000000', $style->getFill()->getEndColor()->getARGB());
} }
public function testReadRichText() public function testReadRichText()
@ -171,7 +171,7 @@ class OdsTest extends PHPUnit_Framework_TestCase
$spreadsheet = $this->loadOOCalcTestFile(); $spreadsheet = $this->loadOOCalcTestFile();
$firstSheet = $spreadsheet->getSheet(0); $firstSheet = $spreadsheet->getSheet(0);
$this->assertEquals( self::assertEquals(
"I don't know if OOCalc supports Rich Text in the same way as Excel, " . "I don't know if OOCalc supports Rich Text in the same way as Excel, " .
'And this row should be autofit height with text wrap', 'And this row should be autofit height with text wrap',
$firstSheet->getCell('A28')->getValue() $firstSheet->getCell('A28')->getValue()
@ -183,10 +183,10 @@ class OdsTest extends PHPUnit_Framework_TestCase
$spreadsheet = $this->loadDataFile(); $spreadsheet = $this->loadDataFile();
$firstSheet = $spreadsheet->getSheet(0); $firstSheet = $spreadsheet->getSheet(0);
$this->assertEquals('This has 4 spaces before and 2 after ', $firstSheet->getCell('A8')->getValue()); self::assertEquals('This has 4 spaces before and 2 after ', $firstSheet->getCell('A8')->getValue());
$this->assertEquals('This only one after ', $firstSheet->getCell('A9')->getValue()); self::assertEquals('This only one after ', $firstSheet->getCell('A9')->getValue());
$this->assertEquals('Test with DIFFERENT styles and multiple spaces: ', $firstSheet->getCell('A10')->getValue()); self::assertEquals('Test with DIFFERENT styles and multiple spaces: ', $firstSheet->getCell('A10')->getValue());
$this->assertEquals("test with new \nLines", $firstSheet->getCell('A11')->getValue()); self::assertEquals("test with new \nLines", $firstSheet->getCell('A11')->getValue());
} }
public function testReadHyperlinks() public function testReadHyperlinks()
@ -196,9 +196,9 @@ class OdsTest extends PHPUnit_Framework_TestCase
$hyperlink = $firstSheet->getCell('A29'); $hyperlink = $firstSheet->getCell('A29');
$this->assertEquals(DataType::TYPE_STRING, $hyperlink->getDataType()); self::assertEquals(DataType::TYPE_STRING, $hyperlink->getDataType());
$this->assertEquals('PHPExcel', $hyperlink->getValue()); self::assertEquals('PHPExcel', $hyperlink->getValue());
$this->assertEquals('http://www.phpexcel.net/', $hyperlink->getHyperlink()->getUrl()); self::assertEquals('http://www.phpexcel.net/', $hyperlink->getHyperlink()->getUrl());
} }
/* /*
@ -215,15 +215,15 @@ class OdsTest extends PHPUnit_Framework_TestCase
// Font styles // Font styles
$style = $firstSheet->getCell('A1')->getStyle(); $style = $firstSheet->getCell('A1')->getStyle();
$this->assertEquals('FF000000', $style->getFont()->getColor()->getARGB()); self::assertEquals('FF000000', $style->getFont()->getColor()->getARGB());
$this->assertEquals(11, $style->getFont()->getSize()); self::assertEquals(11, $style->getFont()->getSize());
$this->assertEquals(Font::UNDERLINE_NONE, $style->getFont()->getUnderline()); self::assertEquals(Font::UNDERLINE_NONE, $style->getFont()->getUnderline());
$style = $firstSheet->getCell('E3')->getStyle(); $style = $firstSheet->getCell('E3')->getStyle();
$this->assertEquals(Font::UNDERLINE_SINGLE, $style->getFont()->getUnderline()); self::assertEquals(Font::UNDERLINE_SINGLE, $style->getFont()->getUnderline());
$style = $firstSheet->getCell('E1')->getStyle(); $style = $firstSheet->getCell('E1')->getStyle();
$this->assertTrue($style->getFont()->getBold()); self::assertTrue($style->getFont()->getBold());
$this->assertTrue($style->getFont()->getItalic()); self::assertTrue($style->getFont()->getItalic());
} }
} }

View File

@ -20,7 +20,7 @@ class XEEValidatorTest extends PHPUnit_Framework_TestCase
$reader = $this->getMockForAbstractClass(BaseReader::class); $reader = $this->getMockForAbstractClass(BaseReader::class);
$expectedResult = 'FAILURE: Should throw an Exception rather than return a value'; $expectedResult = 'FAILURE: Should throw an Exception rather than return a value';
$result = $reader->securityScanFile($filename); $result = $reader->securityScanFile($filename);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerInvalidXML() public function providerInvalidXML()
@ -65,7 +65,7 @@ class XEEValidatorTest extends PHPUnit_Framework_TestCase
{ {
$reader = $this->getMockForAbstractClass(BaseReader::class); $reader = $this->getMockForAbstractClass(BaseReader::class);
$result = $reader->securityScanFile($filename); $result = $reader->securityScanFile($filename);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerValidXML() public function providerValidXML()

View File

@ -28,7 +28,7 @@ class ReferenceHelperTest extends PHPUnit_Framework_TestCase
shuffle($columnBase); shuffle($columnBase);
usort($columnBase, [ReferenceHelper::class, 'columnSort']); usort($columnBase, [ReferenceHelper::class, 'columnSort']);
foreach ($columnBase as $key => $value) { foreach ($columnBase as $key => $value) {
$this->assertEquals($columnExpectedResult[$key], $value); self::assertEquals($columnExpectedResult[$key], $value);
} }
} }
@ -50,7 +50,7 @@ class ReferenceHelperTest extends PHPUnit_Framework_TestCase
$columnExpectedResult = array_reverse($columnExpectedResult); $columnExpectedResult = array_reverse($columnExpectedResult);
usort($columnBase, [ReferenceHelper::class, 'columnReverseSort']); usort($columnBase, [ReferenceHelper::class, 'columnReverseSort']);
foreach ($columnBase as $key => $value) { foreach ($columnBase as $key => $value) {
$this->assertEquals($columnExpectedResult[$key], $value); self::assertEquals($columnExpectedResult[$key], $value);
} }
} }
} }

View File

@ -26,15 +26,15 @@ class SettingsTest extends PHPUnit_Framework_TestCase
public function testGetXMLSettings() public function testGetXMLSettings()
{ {
$result = Settings::getLibXmlLoaderOptions(); $result = Settings::getLibXmlLoaderOptions();
$this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR) & $result)); self::assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR) & $result));
$this->assertFalse(libxml_disable_entity_loader()); self::assertFalse(libxml_disable_entity_loader());
} }
public function testSetXMLSettings() public function testSetXMLSettings()
{ {
Settings::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID); Settings::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID);
$result = Settings::getLibXmlLoaderOptions(); $result = Settings::getLibXmlLoaderOptions();
$this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result)); self::assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result));
$this->assertFalse(libxml_disable_entity_loader()); self::assertFalse(libxml_disable_entity_loader());
} }
} }

View File

@ -16,7 +16,7 @@ class CodePageTest extends PHPUnit_Framework_TestCase
public function testCodePageNumberToName($expectedResult, ...$args) public function testCodePageNumberToName($expectedResult, ...$args)
{ {
$result = CodePage::numberToName(...$args); $result = CodePage::numberToName(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerCodePage() public function providerCodePage()
@ -30,7 +30,7 @@ class CodePageTest extends PHPUnit_Framework_TestCase
try { try {
CodePage::numberToName($invalidCodePage); CodePage::numberToName($invalidCodePage);
} catch (Exception $e) { } catch (Exception $e) {
$this->assertEquals($e->getMessage(), 'Unknown codepage: 12345'); self::assertEquals($e->getMessage(), 'Unknown codepage: 12345');
return; return;
} }
@ -43,7 +43,7 @@ class CodePageTest extends PHPUnit_Framework_TestCase
try { try {
CodePage::numberToName($unsupportedCodePage); CodePage::numberToName($unsupportedCodePage);
} catch (Exception $e) { } catch (Exception $e) {
$this->assertEquals($e->getMessage(), 'Code page 720 not supported.'); self::assertEquals($e->getMessage(), 'Code page 720 not supported.');
return; return;
} }

View File

@ -16,7 +16,7 @@ class DateTest extends PHPUnit_Framework_TestCase
foreach ($calendarValues as $calendarValue) { foreach ($calendarValues as $calendarValue) {
$result = Date::setExcelCalendar($calendarValue); $result = Date::setExcelCalendar($calendarValue);
$this->assertTrue($result); self::assertTrue($result);
} }
} }
@ -24,7 +24,7 @@ class DateTest extends PHPUnit_Framework_TestCase
{ {
$unsupportedCalendar = '2012'; $unsupportedCalendar = '2012';
$result = Date::setExcelCalendar($unsupportedCalendar); $result = Date::setExcelCalendar($unsupportedCalendar);
$this->assertFalse($result); self::assertFalse($result);
} }
/** /**
@ -37,7 +37,7 @@ class DateTest extends PHPUnit_Framework_TestCase
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$result = Date::excelToTimestamp(...$args); $result = Date::excelToTimestamp(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerDateTimeExcelToTimestamp1900() public function providerDateTimeExcelToTimestamp1900()
@ -55,7 +55,7 @@ class DateTest extends PHPUnit_Framework_TestCase
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$result = Date::timestampToExcel(...$args); $result = Date::timestampToExcel(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-5); self::assertEquals($expectedResult, $result, null, 1E-5);
} }
public function providerDateTimeTimestampToExcel1900() public function providerDateTimeTimestampToExcel1900()
@ -73,7 +73,7 @@ class DateTest extends PHPUnit_Framework_TestCase
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$result = Date::dateTimeToExcel(...$args); $result = Date::dateTimeToExcel(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-5); self::assertEquals($expectedResult, $result, null, 1E-5);
} }
public function providerDateTimeDateTimeToExcel() public function providerDateTimeDateTimeToExcel()
@ -91,7 +91,7 @@ class DateTest extends PHPUnit_Framework_TestCase
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$result = Date::formattedPHPToExcel(...$args); $result = Date::formattedPHPToExcel(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-5); self::assertEquals($expectedResult, $result, null, 1E-5);
} }
public function providerDateTimeFormattedPHPToExcel1900() public function providerDateTimeFormattedPHPToExcel1900()
@ -109,7 +109,7 @@ class DateTest extends PHPUnit_Framework_TestCase
Date::setExcelCalendar(Date::CALENDAR_MAC_1904); Date::setExcelCalendar(Date::CALENDAR_MAC_1904);
$result = Date::excelToTimestamp(...$args); $result = Date::excelToTimestamp(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerDateTimeExcelToTimestamp1904() public function providerDateTimeExcelToTimestamp1904()
@ -127,7 +127,7 @@ class DateTest extends PHPUnit_Framework_TestCase
Date::setExcelCalendar(Date::CALENDAR_MAC_1904); Date::setExcelCalendar(Date::CALENDAR_MAC_1904);
$result = Date::timestampToExcel(...$args); $result = Date::timestampToExcel(...$args);
$this->assertEquals($expectedResult, $result, null, 1E-5); self::assertEquals($expectedResult, $result, null, 1E-5);
} }
public function providerDateTimeTimestampToExcel1904() public function providerDateTimeTimestampToExcel1904()
@ -143,7 +143,7 @@ class DateTest extends PHPUnit_Framework_TestCase
public function testIsDateTimeFormatCode($expectedResult, ...$args) public function testIsDateTimeFormatCode($expectedResult, ...$args)
{ {
$result = Date::isDateTimeFormatCode(...$args); $result = Date::isDateTimeFormatCode(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerIsDateTimeFormatCode() public function providerIsDateTimeFormatCode()
@ -161,7 +161,7 @@ class DateTest extends PHPUnit_Framework_TestCase
Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900);
$result = Date::excelToTimestamp(...$args); $result = Date::excelToTimestamp(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerDateTimeExcelToTimestamp1900Timezone() public function providerDateTimeExcelToTimestamp1900Timezone()

View File

@ -12,7 +12,7 @@ class FileTest extends PHPUnit_Framework_TestCase
$expectedResult = false; $expectedResult = false;
$result = File::getUseUploadTempDirectory(); $result = File::getUseUploadTempDirectory();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testSetUseUploadTempDirectory() public function testSetUseUploadTempDirectory()
@ -26,7 +26,7 @@ class FileTest extends PHPUnit_Framework_TestCase
File::setUseUploadTempDirectory($useUploadTempDirectoryValue); File::setUseUploadTempDirectory($useUploadTempDirectoryValue);
$result = File::getUseUploadTempDirectory(); $result = File::getUseUploadTempDirectory();
$this->assertEquals($useUploadTempDirectoryValue, $result); self::assertEquals($useUploadTempDirectoryValue, $result);
} }
} }
} }

View File

@ -12,7 +12,7 @@ class FontTest extends PHPUnit_Framework_TestCase
$expectedResult = Font::AUTOSIZE_METHOD_APPROX; $expectedResult = Font::AUTOSIZE_METHOD_APPROX;
$result = Font::getAutoSizeMethod(); $result = Font::getAutoSizeMethod();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testSetAutoSizeMethod() public function testSetAutoSizeMethod()
@ -24,7 +24,7 @@ class FontTest extends PHPUnit_Framework_TestCase
foreach ($autosizeMethodValues as $autosizeMethodValue) { foreach ($autosizeMethodValues as $autosizeMethodValue) {
$result = Font::setAutoSizeMethod($autosizeMethodValue); $result = Font::setAutoSizeMethod($autosizeMethodValue);
$this->assertTrue($result); self::assertTrue($result);
} }
} }
@ -33,7 +33,7 @@ class FontTest extends PHPUnit_Framework_TestCase
$unsupportedAutosizeMethod = 'guess'; $unsupportedAutosizeMethod = 'guess';
$result = Font::setAutoSizeMethod($unsupportedAutosizeMethod); $result = Font::setAutoSizeMethod($unsupportedAutosizeMethod);
$this->assertFalse($result); self::assertFalse($result);
} }
/** /**
@ -44,7 +44,7 @@ class FontTest extends PHPUnit_Framework_TestCase
public function testFontSizeToPixels($expectedResult, ...$args) public function testFontSizeToPixels($expectedResult, ...$args)
{ {
$result = Font::fontSizeToPixels(...$args); $result = Font::fontSizeToPixels(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerFontSizeToPixels() public function providerFontSizeToPixels()
@ -60,7 +60,7 @@ class FontTest extends PHPUnit_Framework_TestCase
public function testInchSizeToPixels($expectedResult, ...$args) public function testInchSizeToPixels($expectedResult, ...$args)
{ {
$result = Font::inchSizeToPixels(...$args); $result = Font::inchSizeToPixels(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerInchSizeToPixels() public function providerInchSizeToPixels()
@ -76,7 +76,7 @@ class FontTest extends PHPUnit_Framework_TestCase
public function testCentimeterSizeToPixels($expectedResult, ...$args) public function testCentimeterSizeToPixels($expectedResult, ...$args)
{ {
$result = Font::centimeterSizeToPixels(...$args); $result = Font::centimeterSizeToPixels(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerCentimeterSizeToPixels() public function providerCentimeterSizeToPixels()

View File

@ -16,7 +16,7 @@ class PasswordHasherTest extends PHPUnit_Framework_TestCase
public function testHashPassword($expectedResult, ...$args) public function testHashPassword($expectedResult, ...$args)
{ {
$result = PasswordHasher::hashPassword(...$args); $result = PasswordHasher::hashPassword(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerHashPassword() public function providerHashPassword()

View File

@ -18,7 +18,7 @@ class StringHelperTest extends PHPUnit_Framework_TestCase
public function testGetIsIconvEnabled() public function testGetIsIconvEnabled()
{ {
$result = StringHelper::getIsIconvEnabled(); $result = StringHelper::getIsIconvEnabled();
$this->assertTrue($result); self::assertTrue($result);
} }
public function testGetDecimalSeparator() public function testGetDecimalSeparator()
@ -27,7 +27,7 @@ class StringHelperTest extends PHPUnit_Framework_TestCase
$expectedResult = (!empty($localeconv['decimal_point'])) ? $localeconv['decimal_point'] : ','; $expectedResult = (!empty($localeconv['decimal_point'])) ? $localeconv['decimal_point'] : ',';
$result = StringHelper::getDecimalSeparator(); $result = StringHelper::getDecimalSeparator();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testSetDecimalSeparator() public function testSetDecimalSeparator()
@ -36,7 +36,7 @@ class StringHelperTest extends PHPUnit_Framework_TestCase
StringHelper::setDecimalSeparator($expectedResult); StringHelper::setDecimalSeparator($expectedResult);
$result = StringHelper::getDecimalSeparator(); $result = StringHelper::getDecimalSeparator();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testGetThousandsSeparator() public function testGetThousandsSeparator()
@ -45,7 +45,7 @@ class StringHelperTest extends PHPUnit_Framework_TestCase
$expectedResult = (!empty($localeconv['thousands_sep'])) ? $localeconv['thousands_sep'] : ','; $expectedResult = (!empty($localeconv['thousands_sep'])) ? $localeconv['thousands_sep'] : ',';
$result = StringHelper::getThousandsSeparator(); $result = StringHelper::getThousandsSeparator();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testSetThousandsSeparator() public function testSetThousandsSeparator()
@ -54,7 +54,7 @@ class StringHelperTest extends PHPUnit_Framework_TestCase
StringHelper::setThousandsSeparator($expectedResult); StringHelper::setThousandsSeparator($expectedResult);
$result = StringHelper::getThousandsSeparator(); $result = StringHelper::getThousandsSeparator();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testGetCurrencyCode() public function testGetCurrencyCode()
@ -62,7 +62,7 @@ class StringHelperTest extends PHPUnit_Framework_TestCase
$localeconv = localeconv(); $localeconv = localeconv();
$expectedResult = (!empty($localeconv['currency_symbol']) ? $localeconv['currency_symbol'] : (!empty($localeconv['int_curr_symbol']) ? $localeconv['int_curr_symbol'] : '$')); $expectedResult = (!empty($localeconv['currency_symbol']) ? $localeconv['currency_symbol'] : (!empty($localeconv['int_curr_symbol']) ? $localeconv['int_curr_symbol'] : '$'));
$result = StringHelper::getCurrencyCode(); $result = StringHelper::getCurrencyCode();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testSetCurrencyCode() public function testSetCurrencyCode()
@ -71,7 +71,7 @@ class StringHelperTest extends PHPUnit_Framework_TestCase
StringHelper::setCurrencyCode($expectedResult); StringHelper::setCurrencyCode($expectedResult);
$result = StringHelper::getCurrencyCode(); $result = StringHelper::getCurrencyCode();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testControlCharacterPHP2OOXML() public function testControlCharacterPHP2OOXML()
@ -79,7 +79,7 @@ class StringHelperTest extends PHPUnit_Framework_TestCase
$expectedResult = 'foo_x000B_bar'; $expectedResult = 'foo_x000B_bar';
$result = StringHelper::controlCharacterPHP2OOXML('foo' . chr(11) . 'bar'); $result = StringHelper::controlCharacterPHP2OOXML('foo' . chr(11) . 'bar');
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testControlCharacterOOXML2PHP() public function testControlCharacterOOXML2PHP()
@ -87,7 +87,7 @@ class StringHelperTest extends PHPUnit_Framework_TestCase
$expectedResult = 'foo' . chr(11) . 'bar'; $expectedResult = 'foo' . chr(11) . 'bar';
$result = StringHelper::controlCharacterOOXML2PHP('foo_x000B_bar'); $result = StringHelper::controlCharacterOOXML2PHP('foo_x000B_bar');
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testSYLKtoUTF8() public function testSYLKtoUTF8()
@ -95,6 +95,6 @@ class StringHelperTest extends PHPUnit_Framework_TestCase
$expectedResult = 'foo' . chr(11) . 'bar'; $expectedResult = 'foo' . chr(11) . 'bar';
$result = StringHelper::SYLKtoUTF8("foo\x1B ;bar"); $result = StringHelper::SYLKtoUTF8("foo\x1B ;bar");
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
} }

View File

@ -19,7 +19,7 @@ class TimeZoneTest extends PHPUnit_Framework_TestCase
foreach ($timezoneValues as $timezoneValue) { foreach ($timezoneValues as $timezoneValue) {
$result = TimeZone::setTimezone($timezoneValue); $result = TimeZone::setTimezone($timezoneValue);
$this->assertTrue($result); self::assertTrue($result);
} }
} }
@ -27,6 +27,6 @@ class TimeZoneTest extends PHPUnit_Framework_TestCase
{ {
$unsupportedTimezone = 'Etc/GMT+10'; $unsupportedTimezone = 'Etc/GMT+10';
$result = TimeZone::setTimezone($unsupportedTimezone); $result = TimeZone::setTimezone($unsupportedTimezone);
$this->assertFalse($result); self::assertFalse($result);
} }
} }

View File

@ -16,11 +16,11 @@ class BorderTest extends PHPUnit_Framework_TestCase
$bottom = $borders->getBottom(); $bottom = $borders->getBottom();
$actual = $bottom->getBorderStyle(); $actual = $bottom->getBorderStyle();
$this->assertSame(Border::BORDER_NONE, $actual, 'should default to none'); self::assertSame(Border::BORDER_NONE, $actual, 'should default to none');
$allBorders->setBorderStyle(Border::BORDER_THIN); $allBorders->setBorderStyle(Border::BORDER_THIN);
$actual = $bottom->getBorderStyle(); $actual = $bottom->getBorderStyle();
$this->assertSame(Border::BORDER_THIN, $actual, 'should have been set via allBorders'); self::assertSame(Border::BORDER_THIN, $actual, 'should have been set via allBorders');
} }
} }

View File

@ -15,7 +15,7 @@ class ColorTest extends PHPUnit_Framework_TestCase
public function testGetRed($expectedResult, ...$args) public function testGetRed($expectedResult, ...$args)
{ {
$result = Color::getRed(...$args); $result = Color::getRed(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerColorGetRed() public function providerColorGetRed()
@ -31,7 +31,7 @@ class ColorTest extends PHPUnit_Framework_TestCase
public function testGetGreen($expectedResult, ...$args) public function testGetGreen($expectedResult, ...$args)
{ {
$result = Color::getGreen(...$args); $result = Color::getGreen(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerColorGetGreen() public function providerColorGetGreen()
@ -47,7 +47,7 @@ class ColorTest extends PHPUnit_Framework_TestCase
public function testGetBlue($expectedResult, ...$args) public function testGetBlue($expectedResult, ...$args)
{ {
$result = Color::getBlue(...$args); $result = Color::getBlue(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerColorGetBlue() public function providerColorGetBlue()
@ -63,7 +63,7 @@ class ColorTest extends PHPUnit_Framework_TestCase
public function testChangeBrightness($expectedResult, ...$args) public function testChangeBrightness($expectedResult, ...$args)
{ {
$result = Color::changeBrightness(...$args); $result = Color::changeBrightness(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerColorChangeBrightness() public function providerColorChangeBrightness()

View File

@ -22,7 +22,7 @@ class NumberFormatDateTest extends PHPUnit_Framework_TestCase
public function testFormatValueWithMask($expectedResult, ...$args) public function testFormatValueWithMask($expectedResult, ...$args)
{ {
$result = NumberFormat::toFormattedString(...$args); $result = NumberFormat::toFormattedString(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerNumberFormat() public function providerNumberFormat()

View File

@ -22,7 +22,7 @@ class NumberFormatTest extends PHPUnit_Framework_TestCase
public function testFormatValueWithMask($expectedResult, ...$args) public function testFormatValueWithMask($expectedResult, ...$args)
{ {
$result = NumberFormat::toFormattedString(...$args); $result = NumberFormat::toFormattedString(...$args);
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function providerNumberFormat() public function providerNumberFormat()

View File

@ -24,7 +24,7 @@ class RuleTest extends PHPUnit_Framework_TestCase
public function testGetRuleType() public function testGetRuleType()
{ {
$result = $this->testAutoFilterRuleObject->getRuleType(); $result = $this->testAutoFilterRuleObject->getRuleType();
$this->assertEquals(Column\Rule::AUTOFILTER_RULETYPE_FILTER, $result); self::assertEquals(Column\Rule::AUTOFILTER_RULETYPE_FILTER, $result);
} }
public function testSetRuleType() public function testSetRuleType()
@ -33,10 +33,10 @@ class RuleTest extends PHPUnit_Framework_TestCase
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterRuleObject->setRuleType($expectedResult); $result = $this->testAutoFilterRuleObject->setRuleType($expectedResult);
$this->assertInstanceOf(Column\Rule::class, $result); self::assertInstanceOf(Column\Rule::class, $result);
$result = $this->testAutoFilterRuleObject->getRuleType(); $result = $this->testAutoFilterRuleObject->getRuleType();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testSetValue() public function testSetValue()
@ -45,16 +45,16 @@ class RuleTest extends PHPUnit_Framework_TestCase
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterRuleObject->setValue($expectedResult); $result = $this->testAutoFilterRuleObject->setValue($expectedResult);
$this->assertInstanceOf(Column\Rule::class, $result); self::assertInstanceOf(Column\Rule::class, $result);
$result = $this->testAutoFilterRuleObject->getValue(); $result = $this->testAutoFilterRuleObject->getValue();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testGetOperator() public function testGetOperator()
{ {
$result = $this->testAutoFilterRuleObject->getOperator(); $result = $this->testAutoFilterRuleObject->getOperator();
$this->assertEquals(Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL, $result); self::assertEquals(Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL, $result);
} }
public function testSetOperator() public function testSetOperator()
@ -63,10 +63,10 @@ class RuleTest extends PHPUnit_Framework_TestCase
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterRuleObject->setOperator($expectedResult); $result = $this->testAutoFilterRuleObject->setOperator($expectedResult);
$this->assertInstanceOf(Column\Rule::class, $result); self::assertInstanceOf(Column\Rule::class, $result);
$result = $this->testAutoFilterRuleObject->getOperator(); $result = $this->testAutoFilterRuleObject->getOperator();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testSetGrouping() public function testSetGrouping()
@ -75,28 +75,28 @@ class RuleTest extends PHPUnit_Framework_TestCase
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterRuleObject->setGrouping($expectedResult); $result = $this->testAutoFilterRuleObject->setGrouping($expectedResult);
$this->assertInstanceOf(Column\Rule::class, $result); self::assertInstanceOf(Column\Rule::class, $result);
$result = $this->testAutoFilterRuleObject->getGrouping(); $result = $this->testAutoFilterRuleObject->getGrouping();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testGetParent() public function testGetParent()
{ {
$result = $this->testAutoFilterRuleObject->getParent(); $result = $this->testAutoFilterRuleObject->getParent();
$this->assertInstanceOf(Column::class, $result); self::assertInstanceOf(Column::class, $result);
} }
public function testSetParent() public function testSetParent()
{ {
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterRuleObject->setParent($this->mockAutoFilterColumnObject); $result = $this->testAutoFilterRuleObject->setParent($this->mockAutoFilterColumnObject);
$this->assertInstanceOf(Column\Rule::class, $result); self::assertInstanceOf(Column\Rule::class, $result);
} }
public function testClone() public function testClone()
{ {
$result = clone $this->testAutoFilterRuleObject; $result = clone $this->testAutoFilterRuleObject;
$this->assertInstanceOf(Column\Rule::class, $result); self::assertInstanceOf(Column\Rule::class, $result);
} }
} }

View File

@ -27,7 +27,7 @@ class ColumnTest extends PHPUnit_Framework_TestCase
public function testGetColumnIndex() public function testGetColumnIndex()
{ {
$result = $this->testAutoFilterColumnObject->getColumnIndex(); $result = $this->testAutoFilterColumnObject->getColumnIndex();
$this->assertEquals($this->testInitialColumn, $result); self::assertEquals($this->testInitialColumn, $result);
} }
public function testSetColumnIndex() public function testSetColumnIndex()
@ -36,38 +36,38 @@ class ColumnTest extends PHPUnit_Framework_TestCase
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterColumnObject->setColumnIndex($expectedResult); $result = $this->testAutoFilterColumnObject->setColumnIndex($expectedResult);
$this->assertInstanceOf(AutoFilter\Column::class, $result); self::assertInstanceOf(AutoFilter\Column::class, $result);
$result = $this->testAutoFilterColumnObject->getColumnIndex(); $result = $this->testAutoFilterColumnObject->getColumnIndex();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testGetParent() public function testGetParent()
{ {
$result = $this->testAutoFilterColumnObject->getParent(); $result = $this->testAutoFilterColumnObject->getParent();
$this->assertInstanceOf(AutoFilter::class, $result); self::assertInstanceOf(AutoFilter::class, $result);
} }
public function testSetParent() public function testSetParent()
{ {
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterColumnObject->setParent($this->mockAutoFilterObject); $result = $this->testAutoFilterColumnObject->setParent($this->mockAutoFilterObject);
$this->assertInstanceOf(AutoFilter\Column::class, $result); self::assertInstanceOf(AutoFilter\Column::class, $result);
} }
public function testGetFilterType() public function testGetFilterType()
{ {
$result = $this->testAutoFilterColumnObject->getFilterType(); $result = $this->testAutoFilterColumnObject->getFilterType();
$this->assertEquals(AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER, $result); self::assertEquals(AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER, $result);
} }
public function testSetFilterType() public function testSetFilterType()
{ {
$result = $this->testAutoFilterColumnObject->setFilterType(AutoFilter\Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER); $result = $this->testAutoFilterColumnObject->setFilterType(AutoFilter\Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER);
$this->assertInstanceOf(AutoFilter\Column::class, $result); self::assertInstanceOf(AutoFilter\Column::class, $result);
$result = $this->testAutoFilterColumnObject->getFilterType(); $result = $this->testAutoFilterColumnObject->getFilterType();
$this->assertEquals(AutoFilter\Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER, $result); self::assertEquals(AutoFilter\Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER, $result);
} }
/** /**
@ -83,16 +83,16 @@ class ColumnTest extends PHPUnit_Framework_TestCase
public function testGetJoin() public function testGetJoin()
{ {
$result = $this->testAutoFilterColumnObject->getJoin(); $result = $this->testAutoFilterColumnObject->getJoin();
$this->assertEquals(AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_OR, $result); self::assertEquals(AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_OR, $result);
} }
public function testSetJoin() public function testSetJoin()
{ {
$result = $this->testAutoFilterColumnObject->setJoin(AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND); $result = $this->testAutoFilterColumnObject->setJoin(AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND);
$this->assertInstanceOf(AutoFilter\Column::class, $result); self::assertInstanceOf(AutoFilter\Column::class, $result);
$result = $this->testAutoFilterColumnObject->getJoin(); $result = $this->testAutoFilterColumnObject->getJoin();
$this->assertEquals(AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND, $result); self::assertEquals(AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND, $result);
} }
/** /**
@ -114,7 +114,7 @@ class ColumnTest extends PHPUnit_Framework_TestCase
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterColumnObject->setAttributes($attributeSet); $result = $this->testAutoFilterColumnObject->setAttributes($attributeSet);
$this->assertInstanceOf(AutoFilter\Column::class, $result); self::assertInstanceOf(AutoFilter\Column::class, $result);
} }
public function testGetAttributes() public function testGetAttributes()
@ -127,8 +127,8 @@ class ColumnTest extends PHPUnit_Framework_TestCase
$this->testAutoFilterColumnObject->setAttributes($attributeSet); $this->testAutoFilterColumnObject->setAttributes($attributeSet);
$result = $this->testAutoFilterColumnObject->getAttributes(); $result = $this->testAutoFilterColumnObject->getAttributes();
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
$this->assertCount(count($attributeSet), $result); self::assertCount(count($attributeSet), $result);
} }
public function testSetAttribute() public function testSetAttribute()
@ -141,7 +141,7 @@ class ColumnTest extends PHPUnit_Framework_TestCase
foreach ($attributeSet as $attributeName => $attributeValue) { foreach ($attributeSet as $attributeName => $attributeValue) {
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterColumnObject->setAttribute($attributeName, $attributeValue); $result = $this->testAutoFilterColumnObject->setAttribute($attributeName, $attributeValue);
$this->assertInstanceOf(AutoFilter\Column::class, $result); self::assertInstanceOf(AutoFilter\Column::class, $result);
} }
} }
@ -156,21 +156,21 @@ class ColumnTest extends PHPUnit_Framework_TestCase
foreach ($attributeSet as $attributeName => $attributeValue) { foreach ($attributeSet as $attributeName => $attributeValue) {
$result = $this->testAutoFilterColumnObject->getAttribute($attributeName); $result = $this->testAutoFilterColumnObject->getAttribute($attributeName);
$this->assertEquals($attributeValue, $result); self::assertEquals($attributeValue, $result);
} }
$result = $this->testAutoFilterColumnObject->getAttribute('nonExistentAttribute'); $result = $this->testAutoFilterColumnObject->getAttribute('nonExistentAttribute');
$this->assertNull($result); self::assertNull($result);
} }
public function testClone() public function testClone()
{ {
$originalRule = $this->testAutoFilterColumnObject->createRule(); $originalRule = $this->testAutoFilterColumnObject->createRule();
$result = clone $this->testAutoFilterColumnObject; $result = clone $this->testAutoFilterColumnObject;
$this->assertInstanceOf(AutoFilter\Column::class, $result); self::assertInstanceOf(AutoFilter\Column::class, $result);
$this->assertCount(1, $result->getRules()); self::assertCount(1, $result->getRules());
$this->assertContainsOnlyInstancesOf(AutoFilter\Column\Rule::class, $result->getRules()); self::assertContainsOnlyInstancesOf(AutoFilter\Column\Rule::class, $result->getRules());
$clonedRule = $result->getRules()[0]; $clonedRule = $result->getRules()[0];
$this->assertNotSame($originalRule, $clonedRule); self::assertNotSame($originalRule, $clonedRule);
$this->assertSame($result, $clonedRule->getParent()); self::assertSame($result, $clonedRule->getParent());
} }
} }

View File

@ -36,20 +36,20 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
// magic __toString should return the active autofilter range // magic __toString should return the active autofilter range
$result = $this->testAutoFilterObject; $result = $this->testAutoFilterObject;
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testGetParent() public function testGetParent()
{ {
$result = $this->testAutoFilterObject->getParent(); $result = $this->testAutoFilterObject->getParent();
$this->assertInstanceOf(Worksheet::class, $result); self::assertInstanceOf(Worksheet::class, $result);
} }
public function testSetParent() public function testSetParent()
{ {
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterObject->setParent($this->mockWorksheetObject); $result = $this->testAutoFilterObject->setParent($this->mockWorksheetObject);
$this->assertInstanceOf(AutoFilter::class, $result); self::assertInstanceOf(AutoFilter::class, $result);
} }
public function testGetRange() public function testGetRange()
@ -58,7 +58,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
// Result should be the active autofilter range // Result should be the active autofilter range
$result = $this->testAutoFilterObject->getRange(); $result = $this->testAutoFilterObject->getRange();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
public function testSetRange() public function testSetRange()
@ -71,11 +71,11 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
foreach ($ranges as $actualRange => $fullRange) { foreach ($ranges as $actualRange => $fullRange) {
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterObject->setRange($fullRange); $result = $this->testAutoFilterObject->setRange($fullRange);
$this->assertInstanceOf(AutoFilter::class, $result); self::assertInstanceOf(AutoFilter::class, $result);
// Result should be the new autofilter range // Result should be the new autofilter range
$result = $this->testAutoFilterObject->getRange(); $result = $this->testAutoFilterObject->getRange();
$this->assertEquals($actualRange, $result); self::assertEquals($actualRange, $result);
} }
} }
@ -85,11 +85,11 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterObject->setRange(''); $result = $this->testAutoFilterObject->setRange('');
$this->assertInstanceOf(AutoFilter::class, $result); self::assertInstanceOf(AutoFilter::class, $result);
// Result should be a clear range // Result should be a clear range
$result = $this->testAutoFilterObject->getRange(); $result = $this->testAutoFilterObject->getRange();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
} }
/** /**
@ -106,8 +106,8 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
{ {
// There should be no columns yet defined // There should be no columns yet defined
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
$this->assertCount(0, $result); self::assertCount(0, $result);
} }
public function testGetColumnOffset() public function testGetColumnOffset()
@ -122,7 +122,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
// integer returned representing the column offset within the range // integer returned representing the column offset within the range
foreach ($columnIndexes as $columnIndex => $columnOffset) { foreach ($columnIndexes as $columnIndex => $columnOffset) {
$result = $this->testAutoFilterObject->getColumnOffset($columnIndex); $result = $this->testAutoFilterObject->getColumnOffset($columnIndex);
$this->assertEquals($columnOffset, $result); self::assertEquals($columnOffset, $result);
} }
} }
@ -142,15 +142,15 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterObject->setColumn($expectedResult); $result = $this->testAutoFilterObject->setColumn($expectedResult);
$this->assertInstanceOf(AutoFilter::class, $result); self::assertInstanceOf(AutoFilter::class, $result);
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
// Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column // Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column
// objects for each column we set indexed by the column ID // objects for each column we set indexed by the column ID
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
$this->assertCount(1, $result); self::assertCount(1, $result);
$this->assertArrayHasKey($expectedResult, $result); self::assertArrayHasKey($expectedResult, $result);
$this->assertInstanceOf(Column::class, $result[$expectedResult]); self::assertInstanceOf(Column::class, $result[$expectedResult]);
} }
/** /**
@ -170,15 +170,15 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterObject->setColumn($columnObject); $result = $this->testAutoFilterObject->setColumn($columnObject);
$this->assertInstanceOf(AutoFilter::class, $result); self::assertInstanceOf(AutoFilter::class, $result);
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
// Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column // Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column
// objects for each column we set indexed by the column ID // objects for each column we set indexed by the column ID
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
$this->assertCount(1, $result); self::assertCount(1, $result);
$this->assertArrayHasKey($expectedResult, $result); self::assertArrayHasKey($expectedResult, $result);
$this->assertInstanceOf(Column::class, $result[$expectedResult]); self::assertInstanceOf(Column::class, $result[$expectedResult]);
} }
/** /**
@ -214,11 +214,11 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
// Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column // Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column
// objects for each column we set indexed by the column ID // objects for each column we set indexed by the column ID
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
$this->assertCount(count($columnIndexes), $result); self::assertCount(count($columnIndexes), $result);
foreach ($columnIndexes as $columnIndex) { foreach ($columnIndexes as $columnIndex) {
$this->assertArrayHasKey($columnIndex, $result); self::assertArrayHasKey($columnIndex, $result);
$this->assertInstanceOf(Column::class, $result[$columnIndex]); self::assertInstanceOf(Column::class, $result[$columnIndex]);
} }
} }
@ -234,7 +234,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
// get a \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column object returned // get a \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column object returned
foreach ($columnIndexes as $columnIndex) { foreach ($columnIndexes as $columnIndex) {
$result = $this->testAutoFilterObject->getColumn($columnIndex); $result = $this->testAutoFilterObject->getColumn($columnIndex);
$this->assertInstanceOf(Column::class, $result); self::assertInstanceOf(Column::class, $result);
} }
} }
@ -250,8 +250,8 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
// get a \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column object returned // get a \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column object returned
foreach ($columnIndexes as $columnIndex => $columnID) { foreach ($columnIndexes as $columnIndex => $columnID) {
$result = $this->testAutoFilterObject->getColumnByOffset($columnIndex); $result = $this->testAutoFilterObject->getColumnByOffset($columnIndex);
$this->assertInstanceOf(Column::class, $result); self::assertInstanceOf(Column::class, $result);
$this->assertEquals($result->getColumnIndex(), $columnID); self::assertEquals($result->getColumnIndex(), $columnID);
} }
} }
@ -260,7 +260,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
// If we request a specific column by its column ID, we should // If we request a specific column by its column ID, we should
// get a \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column object returned // get a \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column object returned
$result = $this->testAutoFilterObject->getColumn('K'); $result = $this->testAutoFilterObject->getColumn('K');
$this->assertInstanceOf(Column::class, $result); self::assertInstanceOf(Column::class, $result);
} }
/** /**
@ -284,16 +284,16 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterObject->setRange(''); $result = $this->testAutoFilterObject->setRange('');
$this->assertInstanceOf(AutoFilter::class, $result); self::assertInstanceOf(AutoFilter::class, $result);
// Range should be cleared // Range should be cleared
$result = $this->testAutoFilterObject->getRange(); $result = $this->testAutoFilterObject->getRange();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
// Column array should be cleared // Column array should be cleared
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
$this->assertCount(0, $result); self::assertCount(0, $result);
} }
public function testSetRangeWithExistingColumns() public function testSetRangeWithExistingColumns()
@ -313,17 +313,17 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
// Setters return the instance to implement the fluent interface // Setters return the instance to implement the fluent interface
$result = $this->testAutoFilterObject->setRange($expectedResult); $result = $this->testAutoFilterObject->setRange($expectedResult);
$this->assertInstanceOf(AutoFilter::class, $result); self::assertInstanceOf(AutoFilter::class, $result);
// Range should be correctly set // Range should be correctly set
$result = $this->testAutoFilterObject->getRange(); $result = $this->testAutoFilterObject->getRange();
$this->assertEquals($expectedResult, $result); self::assertEquals($expectedResult, $result);
// Only columns that existed in the original range and that // Only columns that existed in the original range and that
// still fall within the new range should be retained // still fall within the new range should be retained
$result = $this->testAutoFilterObject->getColumns(); $result = $this->testAutoFilterObject->getColumns();
$this->assertInternalType('array', $result); self::assertInternalType('array', $result);
$this->assertCount(count($columnIndexes1), $result); self::assertCount(count($columnIndexes1), $result);
} }
public function testClone() public function testClone()
@ -335,6 +335,6 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
} }
$result = clone $this->testAutoFilterObject; $result = clone $this->testAutoFilterObject;
$this->assertInstanceOf(AutoFilter::class, $result); self::assertInstanceOf(AutoFilter::class, $result);
} }
} }

View File

@ -34,11 +34,11 @@ class ColumnCellIteratorTest extends PHPUnit_Framework_TestCase
{ {
$iterator = new ColumnCellIterator($this->mockWorksheet, 'A'); $iterator = new ColumnCellIterator($this->mockWorksheet, 'A');
$ColumnCellIndexResult = 1; $ColumnCellIndexResult = 1;
$this->assertEquals($ColumnCellIndexResult, $iterator->key()); self::assertEquals($ColumnCellIndexResult, $iterator->key());
foreach ($iterator as $key => $ColumnCell) { foreach ($iterator as $key => $ColumnCell) {
$this->assertEquals($ColumnCellIndexResult++, $key); self::assertEquals($ColumnCellIndexResult++, $key);
$this->assertInstanceOf(Cell::class, $ColumnCell); self::assertInstanceOf(Cell::class, $ColumnCell);
} }
} }
@ -46,11 +46,11 @@ class ColumnCellIteratorTest extends PHPUnit_Framework_TestCase
{ {
$iterator = new ColumnCellIterator($this->mockWorksheet, 'A', 2, 4); $iterator = new ColumnCellIterator($this->mockWorksheet, 'A', 2, 4);
$ColumnCellIndexResult = 2; $ColumnCellIndexResult = 2;
$this->assertEquals($ColumnCellIndexResult, $iterator->key()); self::assertEquals($ColumnCellIndexResult, $iterator->key());
foreach ($iterator as $key => $ColumnCell) { foreach ($iterator as $key => $ColumnCell) {
$this->assertEquals($ColumnCellIndexResult++, $key); self::assertEquals($ColumnCellIndexResult++, $key);
$this->assertInstanceOf(Cell::class, $ColumnCell); self::assertInstanceOf(Cell::class, $ColumnCell);
} }
} }
@ -59,11 +59,11 @@ class ColumnCellIteratorTest extends PHPUnit_Framework_TestCase
$iterator = new ColumnCellIterator($this->mockWorksheet, 'A', 2, 4); $iterator = new ColumnCellIterator($this->mockWorksheet, 'A', 2, 4);
$columnIndexResult = 4; $columnIndexResult = 4;
$iterator->seek(4); $iterator->seek(4);
$this->assertEquals($columnIndexResult, $iterator->key()); self::assertEquals($columnIndexResult, $iterator->key());
for ($i = 1; $i < $columnIndexResult - 1; ++$i) { for ($i = 1; $i < $columnIndexResult - 1; ++$i) {
$iterator->prev(); $iterator->prev();
$this->assertEquals($columnIndexResult - $i, $iterator->key()); self::assertEquals($columnIndexResult - $i, $iterator->key());
} }
} }

View File

@ -31,11 +31,11 @@ class ColumnIteratorTest extends PHPUnit_Framework_TestCase
{ {
$iterator = new ColumnIterator($this->mockWorksheet); $iterator = new ColumnIterator($this->mockWorksheet);
$columnIndexResult = 'A'; $columnIndexResult = 'A';
$this->assertEquals($columnIndexResult, $iterator->key()); self::assertEquals($columnIndexResult, $iterator->key());
foreach ($iterator as $key => $column) { foreach ($iterator as $key => $column) {
$this->assertEquals($columnIndexResult++, $key); self::assertEquals($columnIndexResult++, $key);
$this->assertInstanceOf(Column::class, $column); self::assertInstanceOf(Column::class, $column);
} }
} }
@ -43,11 +43,11 @@ class ColumnIteratorTest extends PHPUnit_Framework_TestCase
{ {
$iterator = new ColumnIterator($this->mockWorksheet, 'B', 'D'); $iterator = new ColumnIterator($this->mockWorksheet, 'B', 'D');
$columnIndexResult = 'B'; $columnIndexResult = 'B';
$this->assertEquals($columnIndexResult, $iterator->key()); self::assertEquals($columnIndexResult, $iterator->key());
foreach ($iterator as $key => $column) { foreach ($iterator as $key => $column) {
$this->assertEquals($columnIndexResult++, $key); self::assertEquals($columnIndexResult++, $key);
$this->assertInstanceOf(Column::class, $column); self::assertInstanceOf(Column::class, $column);
} }
} }
@ -57,12 +57,12 @@ class ColumnIteratorTest extends PHPUnit_Framework_TestCase
$iterator = new ColumnIterator($this->mockWorksheet, 'B', 'D'); $iterator = new ColumnIterator($this->mockWorksheet, 'B', 'D');
$columnIndexResult = 'D'; $columnIndexResult = 'D';
$iterator->seek('D'); $iterator->seek('D');
$this->assertEquals($columnIndexResult, $iterator->key()); self::assertEquals($columnIndexResult, $iterator->key());
for ($i = 1; $i < array_search($columnIndexResult, $ranges); ++$i) { for ($i = 1; $i < array_search($columnIndexResult, $ranges); ++$i) {
$iterator->prev(); $iterator->prev();
$expectedResult = $ranges[array_search($columnIndexResult, $ranges) - $i]; $expectedResult = $ranges[array_search($columnIndexResult, $ranges) - $i];
$this->assertEquals($expectedResult, $iterator->key()); self::assertEquals($expectedResult, $iterator->key());
} }
} }

View File

@ -34,11 +34,11 @@ class RowCellIteratorTest extends PHPUnit_Framework_TestCase
{ {
$iterator = new RowCellIterator($this->mockWorksheet); $iterator = new RowCellIterator($this->mockWorksheet);
$RowCellIndexResult = 'A'; $RowCellIndexResult = 'A';
$this->assertEquals($RowCellIndexResult, $iterator->key()); self::assertEquals($RowCellIndexResult, $iterator->key());
foreach ($iterator as $key => $RowCell) { foreach ($iterator as $key => $RowCell) {
$this->assertEquals($RowCellIndexResult++, $key); self::assertEquals($RowCellIndexResult++, $key);
$this->assertInstanceOf(Cell::class, $RowCell); self::assertInstanceOf(Cell::class, $RowCell);
} }
} }
@ -46,11 +46,11 @@ class RowCellIteratorTest extends PHPUnit_Framework_TestCase
{ {
$iterator = new RowCellIterator($this->mockWorksheet, 2, 'B', 'D'); $iterator = new RowCellIterator($this->mockWorksheet, 2, 'B', 'D');
$RowCellIndexResult = 'B'; $RowCellIndexResult = 'B';
$this->assertEquals($RowCellIndexResult, $iterator->key()); self::assertEquals($RowCellIndexResult, $iterator->key());
foreach ($iterator as $key => $RowCell) { foreach ($iterator as $key => $RowCell) {
$this->assertEquals($RowCellIndexResult++, $key); self::assertEquals($RowCellIndexResult++, $key);
$this->assertInstanceOf(Cell::class, $RowCell); self::assertInstanceOf(Cell::class, $RowCell);
} }
} }
@ -60,12 +60,12 @@ class RowCellIteratorTest extends PHPUnit_Framework_TestCase
$iterator = new RowCellIterator($this->mockWorksheet, 2, 'B', 'D'); $iterator = new RowCellIterator($this->mockWorksheet, 2, 'B', 'D');
$RowCellIndexResult = 'D'; $RowCellIndexResult = 'D';
$iterator->seek('D'); $iterator->seek('D');
$this->assertEquals($RowCellIndexResult, $iterator->key()); self::assertEquals($RowCellIndexResult, $iterator->key());
for ($i = 1; $i < array_search($RowCellIndexResult, $ranges); ++$i) { for ($i = 1; $i < array_search($RowCellIndexResult, $ranges); ++$i) {
$iterator->prev(); $iterator->prev();
$expectedResult = $ranges[array_search($RowCellIndexResult, $ranges) - $i]; $expectedResult = $ranges[array_search($RowCellIndexResult, $ranges) - $i];
$this->assertEquals($expectedResult, $iterator->key()); self::assertEquals($expectedResult, $iterator->key());
} }
} }

View File

@ -31,11 +31,11 @@ class RowIteratorTest extends PHPUnit_Framework_TestCase
{ {
$iterator = new RowIterator($this->mockWorksheet); $iterator = new RowIterator($this->mockWorksheet);
$rowIndexResult = 1; $rowIndexResult = 1;
$this->assertEquals($rowIndexResult, $iterator->key()); self::assertEquals($rowIndexResult, $iterator->key());
foreach ($iterator as $key => $row) { foreach ($iterator as $key => $row) {
$this->assertEquals($rowIndexResult++, $key); self::assertEquals($rowIndexResult++, $key);
$this->assertInstanceOf(Row::class, $row); self::assertInstanceOf(Row::class, $row);
} }
} }
@ -43,11 +43,11 @@ class RowIteratorTest extends PHPUnit_Framework_TestCase
{ {
$iterator = new RowIterator($this->mockWorksheet, 2, 4); $iterator = new RowIterator($this->mockWorksheet, 2, 4);
$rowIndexResult = 2; $rowIndexResult = 2;
$this->assertEquals($rowIndexResult, $iterator->key()); self::assertEquals($rowIndexResult, $iterator->key());
foreach ($iterator as $key => $row) { foreach ($iterator as $key => $row) {
$this->assertEquals($rowIndexResult++, $key); self::assertEquals($rowIndexResult++, $key);
$this->assertInstanceOf(Row::class, $row); self::assertInstanceOf(Row::class, $row);
} }
} }
@ -56,11 +56,11 @@ class RowIteratorTest extends PHPUnit_Framework_TestCase
$iterator = new RowIterator($this->mockWorksheet, 2, 4); $iterator = new RowIterator($this->mockWorksheet, 2, 4);
$columnIndexResult = 4; $columnIndexResult = 4;
$iterator->seek(4); $iterator->seek(4);
$this->assertEquals($columnIndexResult, $iterator->key()); self::assertEquals($columnIndexResult, $iterator->key());
for ($i = 1; $i < $columnIndexResult - 1; ++$i) { for ($i = 1; $i < $columnIndexResult - 1; ++$i) {
$iterator->prev(); $iterator->prev();
$this->assertEquals($columnIndexResult - $i, $iterator->key()); self::assertEquals($columnIndexResult - $i, $iterator->key());
} }
} }

View File

@ -25,23 +25,23 @@ class WorksheetColumnTest extends PHPUnit_Framework_TestCase
public function testInstantiateColumnDefault() public function testInstantiateColumnDefault()
{ {
$column = new Column($this->mockWorksheet); $column = new Column($this->mockWorksheet);
$this->assertInstanceOf(Column::class, $column); self::assertInstanceOf(Column::class, $column);
$columnIndex = $column->getColumnIndex(); $columnIndex = $column->getColumnIndex();
$this->assertEquals('A', $columnIndex); self::assertEquals('A', $columnIndex);
} }
public function testInstantiateColumnSpecified() public function testInstantiateColumnSpecified()
{ {
$column = new Column($this->mockWorksheet, 'E'); $column = new Column($this->mockWorksheet, 'E');
$this->assertInstanceOf(Column::class, $column); self::assertInstanceOf(Column::class, $column);
$columnIndex = $column->getColumnIndex(); $columnIndex = $column->getColumnIndex();
$this->assertEquals('E', $columnIndex); self::assertEquals('E', $columnIndex);
} }
public function testGetCellIterator() public function testGetCellIterator()
{ {
$column = new Column($this->mockWorksheet); $column = new Column($this->mockWorksheet);
$cellIterator = $column->getCellIterator(); $cellIterator = $column->getCellIterator();
$this->assertInstanceOf(ColumnCellIterator::class, $cellIterator); self::assertInstanceOf(ColumnCellIterator::class, $cellIterator);
} }
} }

View File

@ -25,23 +25,23 @@ class WorksheetRowTest extends PHPUnit_Framework_TestCase
public function testInstantiateRowDefault() public function testInstantiateRowDefault()
{ {
$row = new Row($this->mockWorksheet); $row = new Row($this->mockWorksheet);
$this->assertInstanceOf(Row::class, $row); self::assertInstanceOf(Row::class, $row);
$rowIndex = $row->getRowIndex(); $rowIndex = $row->getRowIndex();
$this->assertEquals(1, $rowIndex); self::assertEquals(1, $rowIndex);
} }
public function testInstantiateRowSpecified() public function testInstantiateRowSpecified()
{ {
$row = new Row($this->mockWorksheet, 5); $row = new Row($this->mockWorksheet, 5);
$this->assertInstanceOf(Row::class, $row); self::assertInstanceOf(Row::class, $row);
$rowIndex = $row->getRowIndex(); $rowIndex = $row->getRowIndex();
$this->assertEquals(5, $rowIndex); self::assertEquals(5, $rowIndex);
} }
public function testGetCellIterator() public function testGetCellIterator()
{ {
$row = new Row($this->mockWorksheet); $row = new Row($this->mockWorksheet);
$cellIterator = $row->getCellIterator(); $cellIterator = $row->getCellIterator();
$this->assertInstanceOf(RowCellIterator::class, $cellIterator); self::assertInstanceOf(RowCellIterator::class, $cellIterator);
} }
} }

View File

@ -14,7 +14,7 @@ class WorksheetTest extends PHPUnit_Framework_TestCase
$worksheet = new Worksheet(); $worksheet = new Worksheet();
$worksheet->setTitle($testTitle); $worksheet->setTitle($testTitle);
$this->assertSame($testTitle, $worksheet->getTitle()); self::assertSame($testTitle, $worksheet->getTitle());
} }
public function setTitleInvalidProvider() public function setTitleInvalidProvider()
@ -53,17 +53,17 @@ class WorksheetTest extends PHPUnit_Framework_TestCase
// Set unique title -- should be unchanged // Set unique title -- should be unchanged
$sheet = $spreadsheet->getSheet(0); $sheet = $spreadsheet->getSheet(0);
$sheet->setTitle('Test Title'); $sheet->setTitle('Test Title');
$this->assertSame('Test Title', $sheet->getTitle()); self::assertSame('Test Title', $sheet->getTitle());
// Set duplicate title -- should have numeric suffix appended // Set duplicate title -- should have numeric suffix appended
$sheet = $spreadsheet->getSheet(1); $sheet = $spreadsheet->getSheet(1);
$sheet->setTitle('Test Title'); $sheet->setTitle('Test Title');
$this->assertSame('Test Title 1', $sheet->getTitle()); self::assertSame('Test Title 1', $sheet->getTitle());
// Set duplicate title with validation disabled -- should be unchanged // Set duplicate title with validation disabled -- should be unchanged
$sheet = $spreadsheet->getSheet(2); $sheet = $spreadsheet->getSheet(2);
$sheet->setTitle('Test Title', true, false); $sheet->setTitle('Test Title', true, false);
$this->assertSame('Test Title', $sheet->getTitle()); self::assertSame('Test Title', $sheet->getTitle());
} }
public function testSetCodeName() public function testSetCodeName()
@ -72,7 +72,7 @@ class WorksheetTest extends PHPUnit_Framework_TestCase
$worksheet = new Worksheet(); $worksheet = new Worksheet();
$worksheet->setCodeName($testCodeName); $worksheet->setCodeName($testCodeName);
$this->assertSame($testCodeName, $worksheet->getCodeName()); self::assertSame($testCodeName, $worksheet->getCodeName());
} }
public function setCodeNameInvalidProvider() public function setCodeNameInvalidProvider()
@ -111,16 +111,16 @@ class WorksheetTest extends PHPUnit_Framework_TestCase
// Set unique code name -- should be massaged to Snake_Case // Set unique code name -- should be massaged to Snake_Case
$sheet = $spreadsheet->getSheet(0); $sheet = $spreadsheet->getSheet(0);
$sheet->setCodeName('Test Code Name'); $sheet->setCodeName('Test Code Name');
$this->assertSame('Test_Code_Name', $sheet->getCodeName()); self::assertSame('Test_Code_Name', $sheet->getCodeName());
// Set duplicate code name -- should be massaged and have numeric suffix appended // Set duplicate code name -- should be massaged and have numeric suffix appended
$sheet = $spreadsheet->getSheet(1); $sheet = $spreadsheet->getSheet(1);
$sheet->setCodeName('Test Code Name'); $sheet->setCodeName('Test Code Name');
$this->assertSame('Test_Code_Name_1', $sheet->getCodeName()); self::assertSame('Test_Code_Name_1', $sheet->getCodeName());
// Set duplicate code name with validation disabled -- should be unchanged, and unmassaged // Set duplicate code name with validation disabled -- should be unchanged, and unmassaged
$sheet = $spreadsheet->getSheet(2); $sheet = $spreadsheet->getSheet(2);
$sheet->setCodeName('Test Code Name', false); $sheet->setCodeName('Test Code Name', false);
$this->assertSame('Test Code Name', $sheet->getCodeName()); self::assertSame('Test Code Name', $sheet->getCodeName());
} }
} }

View File

@ -42,7 +42,7 @@ class ContentTest extends PHPUnit_Framework_TestCase
$content = new Content(new Ods(new Spreadsheet())); $content = new Content(new Ods(new Spreadsheet()));
$xml = $content->write(); $xml = $content->write();
$this->assertXmlStringEqualsXmlFile($this->samplesPath . '/content-empty.xml', $xml); self::assertXmlStringEqualsXmlFile($this->samplesPath . '/content-empty.xml', $xml);
} }
public function testWriteSpreadsheet() public function testWriteSpreadsheet()
@ -93,6 +93,6 @@ class ContentTest extends PHPUnit_Framework_TestCase
$content = new Content(new Ods($workbook)); $content = new Content(new Ods($workbook));
$xml = $content->write(); $xml = $content->write();
$this->assertXmlStringEqualsXmlFile($this->samplesPath . '/content-with-data.xml', $xml); self::assertXmlStringEqualsXmlFile($this->samplesPath . '/content-with-data.xml', $xml);
} }
} }

View File

@ -46,7 +46,7 @@ class WorkbookTest extends PHPUnit_Framework_TestCase
$palette = $propertyPalette->getValue($this->workbook); $palette = $propertyPalette->getValue($this->workbook);
$this->assertEquals($expectedResult, $palette); self::assertEquals($expectedResult, $palette);
} }
public function providerAddColor() public function providerAddColor()