diff --git a/.gitattributes b/.gitattributes
index 58182f25..8afa9920 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,3 @@
/Build export-ignore
-/unitTests export-ignore
+/tests export-ignore
README.md export-ignore
diff --git a/.gitignore b/.gitignore
index dea03b5e..c3b65f07 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
build/PHPExcel.phar
-unitTests/codeCoverage
+tests/codeCoverage
analysis
## IDE support
diff --git a/.travis.yml b/.travis.yml
index 68dcb08c..bcc21aad 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,6 +26,6 @@ before_script:
script:
## PHP_CodeSniffer
- - ./vendor/bin/phpcs --report-width=200 --report-summary --report-full src/ unitTests/ --standard=PSR2 -n
+ - ./vendor/bin/phpcs --report-width=200 --report-summary --report-full src/ tests/ --standard=PSR2 -n
## PHPUnit
- - ./vendor/bin/phpunit -c ./unitTests/
+ - ./vendor/bin/phpunit
diff --git a/composer.json b/composer.json
index 243c1e38..4305ae99 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"name": "phpoffice/phpspreadsheet",
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
- "keywords": ["PHP","OpenXML","Excel","xlsx","xls","ods","gnumeric","spreadsheet"],
+ "keywords": ["PHP", "OpenXML", "Excel", "xlsx", "xls", "ods", "gnumeric", "spreadsheet"],
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
"type": "library",
"license": "LGPL-2.1",
@@ -45,5 +45,10 @@
"psr-4": {
"PHPExcel\\": "src/PhpSpreadsheet"
}
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "PhpSpreadsheet\\Tests\\": "tests/PhpSpreadsheet"
+ }
}
}
diff --git a/phpunit-cc.xml b/phpunit-cc.xml
new file mode 100644
index 00000000..c7c314f8
--- /dev/null
+++ b/phpunit-cc.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ ./tests/PhpSpreadsheet
+
+
+
+ ./src
+
+ ./src/PhpSpreadsheet/Shared/PCLZip
+ ./src/PhpSpreadsheet/Shared/JAMA
+ ./src/PhpSpreadsheet/Writer/PDF
+
+
+
+
+
+
+
+
+
+
diff --git a/phpunit.xml b/phpunit.xml
new file mode 100644
index 00000000..52f6ec5f
--- /dev/null
+++ b/phpunit.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ ./tests/PhpSpreadsheet
+
+
+
+ ./src
+
+ ./src/PhpSpreadsheet/Shared/PCLZip
+ ./src/PhpSpreadsheet/Shared/JAMA
+ ./src/PhpSpreadsheet/Writer/PDF
+
+
+
+
diff --git a/src/PhpSpreadsheet/Shared/Date.php b/src/PhpSpreadsheet/Shared/Date.php
index 6bc1cf79..6d3f8342 100644
--- a/src/PhpSpreadsheet/Shared/Date.php
+++ b/src/PhpSpreadsheet/Shared/Date.php
@@ -196,6 +196,8 @@ class Date
* Convert a MS serialized datetime value from Excel to a unix timestamp
*
* @param integer|float $dateValue Excel date/time value
+ * @param \DateTimeZone|string|null $timezone The timezone to assume for the Excel timestamp,
+ * if you don't want to treat it as a UTC value
* @return integer Unix timetamp for this date/time
* @throws \Exception
*/
@@ -226,7 +228,7 @@ class Date
0;
$retValue = false;
- if ((is_object($dateValue)) && ($dateValue instanceof \DateTime)) {
+ if ((is_object($dateValue)) && ($dateValue instanceof \DateTimeInterface)) {
$dateValue->add(new \DateInterval('PT' . $timezoneAdjustment . 'S'));
$retValue = self::formattedPHPToExcel($dateValue->format('Y'), $dateValue->format('m'), $dateValue->format('d'), $dateValue->format('H'), $dateValue->format('i'), $dateValue->format('s'));
} elseif (is_numeric($dateValue)) {
diff --git a/unitTests/Classes/src/Calculation/DateTimeTest.php b/tests/PhpSpreadsheet/Calculation/DateTimeTest.php
similarity index 98%
rename from unitTests/Classes/src/Calculation/DateTimeTest.php
rename to tests/PhpSpreadsheet/Calculation/DateTimeTest.php
index 316f8b3d..9300c604 100644
--- a/unitTests/Classes/src/Calculation/DateTimeTest.php
+++ b/tests/PhpSpreadsheet/Calculation/DateTimeTest.php
@@ -1,9 +1,11 @@
complexAssert = new \PhpSpreadhsheet\unitTests\custom\ComplexAssert();
+ $this->complexAssert = new \PhpSpreadsheet\Tests\Custom\ComplexAssert();
\PHPExcel\Calculation\Functions::setCompatibilityMode(\PHPExcel\Calculation\Functions::COMPATIBILITY_EXCEL);
}
@@ -41,7 +34,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerBESSELI()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/BESSELI.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/BESSELI.data');
}
/**
@@ -57,7 +50,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerBESSELJ()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/BESSELJ.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/BESSELJ.data');
}
/**
@@ -73,7 +66,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerBESSELK()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/BESSELK.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/BESSELK.data');
}
/**
@@ -89,7 +82,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerBESSELY()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/BESSELY.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/BESSELY.data');
}
/**
@@ -105,7 +98,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerCOMPLEX()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/COMPLEX.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/COMPLEX.data');
}
/**
@@ -121,7 +114,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMAGINARY()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMAGINARY.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMAGINARY.data');
}
/**
@@ -137,7 +130,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMREAL()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMREAL.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMREAL.data');
}
/**
@@ -153,7 +146,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMABS()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMABS.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMABS.data');
}
/**
@@ -170,7 +163,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMARGUMENT()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMARGUMENT.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMARGUMENT.data');
}
/**
@@ -186,7 +179,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMCONJUGATE()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMCONJUGATE.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMCONJUGATE.data');
}
/**
@@ -202,7 +195,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMCOS()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMCOS.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMCOS.data');
}
/**
@@ -219,7 +212,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMDIV()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMDIV.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMDIV.data');
}
/**
@@ -235,7 +228,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMEXP()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMEXP.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMEXP.data');
}
/**
@@ -251,7 +244,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMLN()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMLN.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMLN.data');
}
/**
@@ -267,7 +260,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMLOG2()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMLOG2.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMLOG2.data');
}
/**
@@ -283,7 +276,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMLOG10()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMLOG10.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMLOG10.data');
}
/**
@@ -300,7 +293,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMPOWER()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMPOWER.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMPOWER.data');
}
/**
@@ -316,7 +309,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMPRODUCT()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMPRODUCT.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMPRODUCT.data');
}
/**
@@ -332,7 +325,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMSIN()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMSIN.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMSIN.data');
}
/**
@@ -348,7 +341,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMSQRT()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMSQRT.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMSQRT.data');
}
/**
@@ -365,7 +358,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMSUB()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMSUB.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMSUB.data');
}
/**
@@ -382,7 +375,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerIMSUM()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMSUM.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/IMSUM.data');
}
/**
@@ -398,7 +391,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerERF()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/ERF.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/ERF.data');
}
/**
@@ -414,7 +407,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerERFC()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/ERFC.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/ERFC.data');
}
/**
@@ -430,7 +423,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerBIN2DEC()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/BIN2DEC.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/BIN2DEC.data');
}
/**
@@ -446,7 +439,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerBIN2HEX()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/BIN2HEX.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/BIN2HEX.data');
}
/**
@@ -462,7 +455,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerBIN2OCT()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/BIN2OCT.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/BIN2OCT.data');
}
/**
@@ -478,7 +471,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerDEC2BIN()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/DEC2BIN.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/DEC2BIN.data');
}
/**
@@ -494,7 +487,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerDEC2HEX()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/DEC2HEX.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/DEC2HEX.data');
}
/**
@@ -510,7 +503,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerDEC2OCT()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/DEC2OCT.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/DEC2OCT.data');
}
/**
@@ -526,7 +519,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerHEX2BIN()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/HEX2BIN.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/HEX2BIN.data');
}
/**
@@ -542,7 +535,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerHEX2DEC()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/HEX2DEC.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/HEX2DEC.data');
}
/**
@@ -558,7 +551,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerHEX2OCT()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/HEX2OCT.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/HEX2OCT.data');
}
/**
@@ -574,7 +567,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerOCT2BIN()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/OCT2BIN.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/OCT2BIN.data');
}
/**
@@ -590,7 +583,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerOCT2DEC()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/OCT2DEC.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/OCT2DEC.data');
}
/**
@@ -606,7 +599,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerOCT2HEX()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/OCT2HEX.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/OCT2HEX.data');
}
/**
@@ -622,7 +615,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerDELTA()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/DELTA.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/DELTA.data');
}
/**
@@ -638,7 +631,7 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerGESTEP()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/GESTEP.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/GESTEP.data');
}
public function testGetConversionGroups()
@@ -678,6 +671,6 @@ class EngineeringTest extends \PHPUnit_Framework_TestCase
public function providerCONVERTUOM()
{
- return new \PhpSpreadhsheet\unitTests\TestDataFileIterator('rawTestData/Calculation/Engineering/CONVERTUOM.data');
+ return new \PhpSpreadsheet\Tests\TestDataFileIterator('rawTestData/Calculation/Engineering/CONVERTUOM.data');
}
}
diff --git a/unitTests/Classes/src/Calculation/FinancialTest.php b/tests/PhpSpreadsheet/Calculation/FinancialTest.php
similarity index 77%
rename from unitTests/Classes/src/Calculation/FinancialTest.php
rename to tests/PhpSpreadsheet/Calculation/FinancialTest.php
index 12cc3e8f..76dfb6d3 100644
--- a/unitTests/Classes/src/Calculation/FinancialTest.php
+++ b/tests/PhpSpreadsheet/Calculation/FinancialTest.php
@@ -1,8 +1,6 @@
setDataType('BOOLEAN');
- } catch (Exception $e) {
+ } catch (\PHPExcel\Exception $e) {
$this->assertEquals($e->getMessage(), 'Invalid datatype for chart data series values');
return;
}
diff --git a/unitTests/Classes/src/Chart/LayoutTest.php b/tests/PhpSpreadsheet/Chart/LayoutTest.php
similarity index 94%
rename from unitTests/Classes/src/Chart/LayoutTest.php
rename to tests/PhpSpreadsheet/Chart/LayoutTest.php
index 24351207..c4817e58 100644
--- a/unitTests/Classes/src/Chart/LayoutTest.php
+++ b/tests/PhpSpreadsheet/Chart/LayoutTest.php
@@ -1,6 +1,6 @@
mockWorksheet, 'A');
$ColumnCellIndexResult = 1;
$this->assertEquals($ColumnCellIndexResult, $iterator->key());
-
+
foreach ($iterator as $key => $ColumnCell) {
$this->assertEquals($ColumnCellIndexResult++, $key);
$this->assertInstanceOf('\\PHPExcel\\Cell', $ColumnCell);
@@ -43,7 +45,7 @@ class ColumnCellIteratorTest extends \PHPUnit_Framework_TestCase
$iterator = new ColumnCellIterator($this->mockWorksheet, 'A', 2, 4);
$ColumnCellIndexResult = 2;
$this->assertEquals($ColumnCellIndexResult, $iterator->key());
-
+
foreach ($iterator as $key => $ColumnCell) {
$this->assertEquals($ColumnCellIndexResult++, $key);
$this->assertInstanceOf('\\PHPExcel\\Cell', $ColumnCell);
diff --git a/unitTests/Classes/src/Worksheet/ColumnIteratorTest.php b/tests/PhpSpreadsheet/Worksheet/ColumnIteratorTest.php
similarity index 96%
rename from unitTests/Classes/src/Worksheet/ColumnIteratorTest.php
rename to tests/PhpSpreadsheet/Worksheet/ColumnIteratorTest.php
index 0b4e2bf9..14c23fc3 100644
--- a/unitTests/Classes/src/Worksheet/ColumnIteratorTest.php
+++ b/tests/PhpSpreadsheet/Worksheet/ColumnIteratorTest.php
@@ -1,6 +1,8 @@
mockWorksheet);
$columnIndexResult = 'A';
$this->assertEquals($columnIndexResult, $iterator->key());
-
+
foreach ($iterator as $key => $column) {
$this->assertEquals($columnIndexResult++, $key);
$this->assertInstanceOf('\\PHPExcel\\Worksheet\\Column', $column);
@@ -43,7 +45,7 @@ class ColumnIteratorTest extends \PHPUnit_Framework_TestCase
$iterator = new ColumnIterator($this->mockWorksheet, 'B', 'D');
$columnIndexResult = 'B';
$this->assertEquals($columnIndexResult, $iterator->key());
-
+
foreach ($iterator as $key => $column) {
$this->assertEquals($columnIndexResult++, $key);
$this->assertInstanceOf('\\PHPExcel\\Worksheet\\Column', $column);
diff --git a/unitTests/Classes/src/Worksheet/RowCellIteratorTest.php b/tests/PhpSpreadsheet/Worksheet/RowCellIteratorTest.php
similarity index 98%
rename from unitTests/Classes/src/Worksheet/RowCellIteratorTest.php
rename to tests/PhpSpreadsheet/Worksheet/RowCellIteratorTest.php
index 58dca140..eed9e2e6 100644
--- a/unitTests/Classes/src/Worksheet/RowCellIteratorTest.php
+++ b/tests/PhpSpreadsheet/Worksheet/RowCellIteratorTest.php
@@ -1,6 +1,6 @@
/etc/php.d/xdebug.ini
+PHPUnit 5.2.10 by Sebastian Bergmann and contributors.
+
+Runtime: PHP 7.0.4
+Configuration: C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\phpunit.xml
+
+............................................................... 63 / 111 ( 56%)
+..........................FFFFFFFFFFFFFFFFFFFFFF 111 / 111 (100%)
+
+Time: 176 ms, Memory: 10.00Mb
+
+There were 22 failures:
+
+1) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #0 (22269, 'America/New_York', -285138000)
+Failed asserting that -285102000 matches expected -285138000.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+2) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #1 (25569, 'America/New_York', -18000)
+Failed asserting that 18000 matches expected -18000.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+3) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #2 (30292, 'America/New_York', 408049200)
+Failed asserting that 408085200 matches expected 408049200.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+4) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #3 (39611, 'America/New_York', 1213214400)
+Failed asserting that 1213243200 matches expected 1213214400.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+5) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #4 (50424, 'America/New_York', 2147454000)
+Failed asserting that 2147490000 matches expected 2147454000.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+6) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #5 (22345.567889999998, 'America/New_York', -278522534)
+Failed asserting that -278486534 matches expected -278522534.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+7) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #6 (22345.678899999999, 'America/New_York', -278512943)
+Failed asserting that -278476943 matches expected -278512943.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+8) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #7 (0.5, 'America/New_York', 25200)
+Failed asserting that 61200 matches expected 25200.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+9) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #8 (0.75, 'America/New_York', 46800)
+Failed asserting that 82800 matches expected 46800.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+10) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #9 (0.12345, 'America/New_York', -7334)
+Failed asserting that 28666 matches expected -7334.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+11) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #10 (41215, 'America/New_York', 1351800000)
+Failed asserting that 1351828800 matches expected 1351800000.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+12) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #11 (22269, 'Pacific/Auckland', -285076800)
+Failed asserting that -285163200 matches expected -285076800.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+13) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #12 (25569, 'Pacific/Auckland', 43200)
+Failed asserting that -43200 matches expected 43200.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+14) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #13 (30292, 'Pacific/Auckland', 408114000)
+Failed asserting that 408020400 matches expected 408114000.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+15) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #14 (39611, 'Pacific/Auckland', 1213272000)
+Failed asserting that 1213185600 matches expected 1213272000.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+16) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #15 (50423.5, 'Pacific/Auckland', 2147475600)
+Failed asserting that 2147382000 matches expected 2147475600.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+17) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #16 (22345.567889999998, 'Pacific/Auckland', -278461334)
+Failed asserting that -278547734 matches expected -278461334.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+18) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #17 (22345.678899999999, 'Pacific/Auckland', -278451743)
+Failed asserting that -278538143 matches expected -278451743.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+19) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #18 (0.5, 'Pacific/Auckland', 90000)
+Failed asserting that 0 matches expected 90000.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+20) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #19 (0.75, 'Pacific/Auckland', 111600)
+Failed asserting that 21600 matches expected 111600.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+21) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #20 (0.12345, 'Pacific/Auckland', 57466)
+Failed asserting that -32534 matches expected 57466.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+22) PHPExcel\Shared\DateTest::testDateTimeExcelToTimestamp1900Timezone with data set #21 (41215, 'Pacific/Auckland', 1351861200)
+Failed asserting that 1351767600 matches expected 1351861200.
+
+C:\Projects\PHPOffice\PHPSpreadsheet\0.1\unitTests\Classes\src\Shared\DateTest.php:165
+
+FAILURES!
+Tests: 111, Assertions: 112, Failures: 22.
diff --git a/unitTests/phpunit-cc.xml b/unitTests/phpunit-cc.xml
deleted file mode 100644
index 0c0ff340..00000000
--- a/unitTests/phpunit-cc.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- ./Classes
-
-
-
- ../src
-
- ../src/PhpSpreadsheet/Shared/PCLZip
- ../src/PhpSpreadsheet/Shared/JAMA
- ../src/PhpSpreadsheet/Writer/PDF
-
-
-
-
-
-
-
-
-
-
diff --git a/unitTests/phpunit.xml b/unitTests/phpunit.xml
deleted file mode 100644
index 95ca0774..00000000
--- a/unitTests/phpunit.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
- ./Classes
-
-
-
- ../src
-
- ../src/PhpSpreadsheet/Shared/PCLZip
- ../src/PhpSpreadsheet/Shared/JAMA
- ../src/PhpSpreadsheet/Writer/PDF
-
-
-
-
diff --git a/unitTests/rawTestData/Shared/DateTimeFormatCodes.data b/unitTests/rawTestData/Shared/DateTimeFormatCodes.data
deleted file mode 100644
index 73420470..00000000
--- a/unitTests/rawTestData/Shared/DateTimeFormatCodes.data
+++ /dev/null
@@ -1,37 +0,0 @@
-#Excel Format Code Result
-"General", FALSE
-"@", FALSE
-"0", FALSE
-"0.00", FALSE
-"#,##0.00", FALSE
-"#,##0.00_-", FALSE
-"0%", FALSE
-"0.00%", FALSE
-"yyyy-mm-dd", TRUE
-"yy-mm-dd", TRUE
-"dd/mm/yy", TRUE
-"d/m/y", TRUE
-"d-m-y", TRUE
-"d-m", TRUE
-"m-y", TRUE
-"mm-dd-yy", TRUE
-"d-mmm-yy", TRUE
-"d-mmm", TRUE
-"mmm-yy", TRUE
-"m/d/yy h:mm", TRUE
-"d/m/y h:mm", TRUE
-"h:mm AM/PM", TRUE
-"h:mm:ss AM/PM", TRUE
-"h:mm", TRUE
-"h:mm:ss", TRUE
-"mm:ss", TRUE
-"h:mm:ss", TRUE
-"i:s.S", TRUE
-"h:mm:ss;@", TRUE
-"yy/mm/dd;@", TRUE
-"\"$\"#,##0.00_-", FALSE
-"$#,##0_-", FALSE
-"[$EUR ]#,##0.00_-", FALSE
-"_[$EUR ]#,##0.00_-", FALSE
-"[Green]#,##0.00;[Red]#,##0.00_-", FALSE
-"#,##0.00 \"dollars\"", FALSE
diff --git a/unitTests/rawTestData/Shared/DateTimeFormattedPHPToExcel1900.data b/unitTests/rawTestData/Shared/DateTimeFormattedPHPToExcel1900.data
deleted file mode 100644
index bb6ed3f4..00000000
--- a/unitTests/rawTestData/Shared/DateTimeFormattedPHPToExcel1900.data
+++ /dev/null
@@ -1,12 +0,0 @@
-#Year Month Day Hours Minutes Seconds Result Comments
-1901, 12, 14, 714 // PHP 32-bit Earliest Date 14-Dec-1901
-1903, 12, 31, 1461 // 31-Dec-1903
-1904, 1, 1, 1462 // Excel 1904 Calendar Base Date 01-Jan-1904
-1904, 1, 2, 1463 // 02-Jan-1904
-1960, 12, 19, 22269 // 19-Dec-1960
-1970, 1, 1, 25569 // PHP Base Date 01-Jan-1970
-1982, 12, 7, 30292 // 07-Dec-1982
-2008, 6, 12, 39611 // 12-Jun-2008
-2038, 1, 19, 50424 // PHP 32-bit Latest Date 19-Jan-2038
-1903, 5, 18, 13, 37, 46, 1234.56789 // 18-May-1903 13:37:46
-1933, 10, 18, 16, 17, 37, 12345.6789 // 18-Oct-1933 16:17:37
diff --git a/unitTests/rawTestData/Shared/DateTimePHPToExcel1900.data b/unitTests/rawTestData/Shared/DateTimePHPToExcel1900.data
deleted file mode 100644
index dc6a9d90..00000000
--- a/unitTests/rawTestData/Shared/DateTimePHPToExcel1900.data
+++ /dev/null
@@ -1,12 +0,0 @@
-#Excel DateTimeStamp Result Comments
--2147472000, 714 // PHP 32-bit Earliest Date 14-Dec-1901
--2082931200, 1461 // 31-Dec-1903
--2082844800, 1462 // Excel 1904 Calendar Base Date 01-Jan-1904
--2082758400, 1463 // 02-Jan-1904
--285120000, 22269 // 19-Dec-1960
-0, 25569 // PHP Base Date 01-Jan-1970
-408067200, 30292 // 07-Dec-1982
-1213228800, 39611 // 12-Jun-2008
-2147472000, 50424 // PHP 32-bit Latest Date 19-Jan-2038
--2102494934, 1234.56789 // 18-May-1903 13:37:46
--1142494943, 12345.6789 // 18-Oct-1933 16:17:37
diff --git a/unitTests/rawTestData/Shared/DateTimePHPToExcel1904.data b/unitTests/rawTestData/Shared/DateTimePHPToExcel1904.data
deleted file mode 100644
index 98fa4951..00000000
--- a/unitTests/rawTestData/Shared/DateTimePHPToExcel1904.data
+++ /dev/null
@@ -1,7 +0,0 @@
-#Excel DateTimeStamp Result
--1956528000, 1462
--1956441600, 1463
--158803200, 22269
-126316800, 25569
-534384000, 30292
-1339545600, 39611