From 0efdf48119600d5fbcf5c0ae9a8775497ed610b0 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Thu, 23 Nov 2017 14:08:57 -0200 Subject: [PATCH] Support PHPUnit 6 --- composer.json | 2 +- tests/Spout/Common/Entity/Style/BorderTest.php | 3 ++- tests/Spout/Common/Entity/Style/ColorTest.php | 3 ++- tests/Spout/Common/Helper/CellTypeHelperTest.php | 4 +++- tests/Spout/Common/Helper/EncodingHelperTest.php | 3 ++- tests/Spout/Common/Helper/Escaper/ODSTest.php | 3 ++- tests/Spout/Common/Helper/Escaper/XLSXTest.php | 3 ++- tests/Spout/Common/Helper/FileSystemHelperTest.php | 3 ++- tests/Spout/Common/Manager/OptionsManagerTest.php | 4 +++- tests/Spout/Reader/CSV/ReaderTest.php | 3 ++- tests/Spout/Reader/CSV/SheetTest.php | 3 ++- tests/Spout/Reader/Common/Manager/RowManagerTest.php | 3 ++- tests/Spout/Reader/ODS/ReaderTest.php | 3 ++- tests/Spout/Reader/ODS/SheetTest.php | 3 ++- tests/Spout/Reader/ReaderFactoryTest.php | 3 ++- tests/Spout/Reader/Wrapper/XMLReaderTest.php | 3 ++- tests/Spout/Reader/XLSX/Helper/CellHelperTest.php | 3 ++- tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php | 3 ++- tests/Spout/Reader/XLSX/Helper/DateFormatHelperTest.php | 4 +++- .../SharedStringsCaching/CachingStrategyFactoryTest.php | 3 ++- tests/Spout/Reader/XLSX/Manager/SharedStringsManagerTest.php | 3 ++- tests/Spout/Reader/XLSX/Manager/StyleManagerTest.php | 3 ++- tests/Spout/Reader/XLSX/ReaderTest.php | 3 ++- tests/Spout/Reader/XLSX/SheetTest.php | 3 ++- tests/Spout/Writer/CSV/WriterTest.php | 3 ++- tests/Spout/Writer/Common/Creator/StyleBuilderTest.php | 3 ++- tests/Spout/Writer/Common/Creator/WriterFactoryTest.php | 3 ++- tests/Spout/Writer/Common/Entity/SheetTest.php | 3 ++- tests/Spout/Writer/Common/Helper/CellHelperTest.php | 4 +++- tests/Spout/Writer/Common/Manager/Style/StyleManagerTest.php | 3 ++- tests/Spout/Writer/Common/Manager/Style/StyleMergerTest.php | 3 ++- .../Spout/Writer/Common/Manager/Style/StyleRegistryTest.php | 3 ++- tests/Spout/Writer/ODS/Manager/Style/StyleRegistryTest.php | 3 ++- tests/Spout/Writer/ODS/SheetTest.php | 3 ++- tests/Spout/Writer/ODS/WriterTest.php | 5 +++-- tests/Spout/Writer/ODS/WriterWithStyleTest.php | 3 ++- tests/Spout/Writer/XLSX/Manager/Style/StyleManagerTest.php | 4 +++- tests/Spout/Writer/XLSX/Manager/Style/StyleRegistryTest.php | 3 ++- tests/Spout/Writer/XLSX/SheetTest.php | 3 ++- tests/Spout/Writer/XLSX/WriterTest.php | 5 +++-- tests/Spout/Writer/XLSX/WriterWithStyleTest.php | 3 ++- 41 files changed, 88 insertions(+), 43 deletions(-) diff --git a/composer.json b/composer.json index f5d7057..8851173 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "ext-xmlreader" : "*" }, "require-dev": { - "phpunit/phpunit": "^5.7.0", + "phpunit/phpunit": "^5.7.0 || ^6.4.0", "friendsofphp/php-cs-fixer": "^2.7.0" }, "suggest": { diff --git a/tests/Spout/Common/Entity/Style/BorderTest.php b/tests/Spout/Common/Entity/Style/BorderTest.php index c57a8d7..82860fa 100644 --- a/tests/Spout/Common/Entity/Style/BorderTest.php +++ b/tests/Spout/Common/Entity/Style/BorderTest.php @@ -6,11 +6,12 @@ use Box\Spout\Writer\Common\Creator\Style\BorderBuilder; use Box\Spout\Writer\Exception\Border\InvalidNameException; use Box\Spout\Writer\Exception\Border\InvalidStyleException; use Box\Spout\Writer\Exception\Border\InvalidWidthException; +use PHPUnit\Framework\TestCase; /** * Class BorderTest */ -class BorderTest extends \PHPUnit_Framework_TestCase +class BorderTest extends TestCase { /** * @return void diff --git a/tests/Spout/Common/Entity/Style/ColorTest.php b/tests/Spout/Common/Entity/Style/ColorTest.php index 39111b2..3d27a1c 100644 --- a/tests/Spout/Common/Entity/Style/ColorTest.php +++ b/tests/Spout/Common/Entity/Style/ColorTest.php @@ -3,11 +3,12 @@ namespace Box\Spout\Common\Entity\Style; use Box\Spout\Common\Exception\InvalidColorException; +use PHPUnit\Framework\TestCase; /** * Class ColorTest */ -class ColorTest extends \PHPUnit_Framework_TestCase +class ColorTest extends TestCase { /** * @return array diff --git a/tests/Spout/Common/Helper/CellTypeHelperTest.php b/tests/Spout/Common/Helper/CellTypeHelperTest.php index f0d1c7a..b5a4750 100644 --- a/tests/Spout/Common/Helper/CellTypeHelperTest.php +++ b/tests/Spout/Common/Helper/CellTypeHelperTest.php @@ -2,10 +2,12 @@ namespace Box\Spout\Common\Helper; +use PHPUnit\Framework\TestCase; + /** * Class CellTypeHelperTest */ -class CellTypeHelperTest extends \PHPUnit_Framework_TestCase +class CellTypeHelperTest extends TestCase { /** * @return array diff --git a/tests/Spout/Common/Helper/EncodingHelperTest.php b/tests/Spout/Common/Helper/EncodingHelperTest.php index e3e42d1..8d3c158 100644 --- a/tests/Spout/Common/Helper/EncodingHelperTest.php +++ b/tests/Spout/Common/Helper/EncodingHelperTest.php @@ -4,11 +4,12 @@ namespace Box\Spout\Common\Helper; use Box\Spout\Common\Exception\EncodingConversionException; use Box\Spout\TestUsingResource; +use PHPUnit\Framework\TestCase; /** * Class EncodingHelperTest */ -class EncodingHelperTest extends \PHPUnit_Framework_TestCase +class EncodingHelperTest extends TestCase { use TestUsingResource; diff --git a/tests/Spout/Common/Helper/Escaper/ODSTest.php b/tests/Spout/Common/Helper/Escaper/ODSTest.php index 2702cc0..3be0f3f 100644 --- a/tests/Spout/Common/Helper/Escaper/ODSTest.php +++ b/tests/Spout/Common/Helper/Escaper/ODSTest.php @@ -3,11 +3,12 @@ namespace Box\Spout\Common\Helper\Escaper; use Box\Spout\Common\Helper\Escaper; +use PHPUnit\Framework\TestCase; /** * Class ODSTest */ -class ODSTest extends \PHPUnit_Framework_TestCase +class ODSTest extends TestCase { /** * @return array diff --git a/tests/Spout/Common/Helper/Escaper/XLSXTest.php b/tests/Spout/Common/Helper/Escaper/XLSXTest.php index f657f71..255c7c5 100644 --- a/tests/Spout/Common/Helper/Escaper/XLSXTest.php +++ b/tests/Spout/Common/Helper/Escaper/XLSXTest.php @@ -3,11 +3,12 @@ namespace Box\Spout\Common\Helper\Escaper; use Box\Spout\Common\Helper\Escaper; +use PHPUnit\Framework\TestCase; /** * Class XLSXTest */ -class XLSXTest extends \PHPUnit_Framework_TestCase +class XLSXTest extends TestCase { /** * @return array diff --git a/tests/Spout/Common/Helper/FileSystemHelperTest.php b/tests/Spout/Common/Helper/FileSystemHelperTest.php index e865bda..7c7da03 100644 --- a/tests/Spout/Common/Helper/FileSystemHelperTest.php +++ b/tests/Spout/Common/Helper/FileSystemHelperTest.php @@ -3,11 +3,12 @@ namespace Box\Spout\Common\Helper; use Box\Spout\Common\Exception\IOException; +use PHPUnit\Framework\TestCase; /** * Class FileSystemHelperTest */ -class FileSystemHelperTest extends \PHPUnit_Framework_TestCase +class FileSystemHelperTest extends TestCase { /** @var \Box\Spout\Writer\XLSX\Helper\FileSystemHelper */ protected $fileSystemHelper; diff --git a/tests/Spout/Common/Manager/OptionsManagerTest.php b/tests/Spout/Common/Manager/OptionsManagerTest.php index c3f25f7..ed64be0 100644 --- a/tests/Spout/Common/Manager/OptionsManagerTest.php +++ b/tests/Spout/Common/Manager/OptionsManagerTest.php @@ -2,10 +2,12 @@ namespace Box\Spout\Common\Manager; +use PHPUnit\Framework\TestCase; + /** * Class OptionsManagerTest */ -class OptionsManagerTest extends \PHPUnit_Framework_TestCase +class OptionsManagerTest extends TestCase { /** * @return void diff --git a/tests/Spout/Reader/CSV/ReaderTest.php b/tests/Spout/Reader/CSV/ReaderTest.php index 6605394..684b045 100644 --- a/tests/Spout/Reader/CSV/ReaderTest.php +++ b/tests/Spout/Reader/CSV/ReaderTest.php @@ -11,11 +11,12 @@ use Box\Spout\Reader\CSV\Manager\OptionsManager; use Box\Spout\Reader\Exception\ReaderNotOpenedException; use Box\Spout\Reader\ReaderInterface; use Box\Spout\TestUsingResource; +use PHPUnit\Framework\TestCase; /** * Class ReaderTest */ -class ReaderTest extends \PHPUnit_Framework_TestCase +class ReaderTest extends TestCase { use TestUsingResource; diff --git a/tests/Spout/Reader/CSV/SheetTest.php b/tests/Spout/Reader/CSV/SheetTest.php index e980de0..ac50dfa 100644 --- a/tests/Spout/Reader/CSV/SheetTest.php +++ b/tests/Spout/Reader/CSV/SheetTest.php @@ -5,11 +5,12 @@ namespace Box\Spout\Reader\CSV; use Box\Spout\Common\Type; use Box\Spout\Reader\Common\Creator\EntityFactory; use Box\Spout\TestUsingResource; +use PHPUnit\Framework\TestCase; /** * Class SheetTest */ -class SheetTest extends \PHPUnit_Framework_TestCase +class SheetTest extends TestCase { use TestUsingResource; diff --git a/tests/Spout/Reader/Common/Manager/RowManagerTest.php b/tests/Spout/Reader/Common/Manager/RowManagerTest.php index 8afd39f..b676848 100644 --- a/tests/Spout/Reader/Common/Manager/RowManagerTest.php +++ b/tests/Spout/Reader/Common/Manager/RowManagerTest.php @@ -7,11 +7,12 @@ use Box\Spout\Common\Entity\Row; use Box\Spout\Reader\XLSX\Creator\HelperFactory; use Box\Spout\Reader\XLSX\Creator\InternalEntityFactory; use Box\Spout\Reader\XLSX\Creator\ManagerFactory; +use PHPUnit\Framework\TestCase; /** * Class RowManagerTest */ -class RowManagerTest extends \PHPUnit_Framework_TestCase +class RowManagerTest extends TestCase { /** * @return array diff --git a/tests/Spout/Reader/ODS/ReaderTest.php b/tests/Spout/Reader/ODS/ReaderTest.php index 3f99378..e9c2909 100644 --- a/tests/Spout/Reader/ODS/ReaderTest.php +++ b/tests/Spout/Reader/ODS/ReaderTest.php @@ -7,11 +7,12 @@ use Box\Spout\Common\Type; use Box\Spout\Reader\Common\Creator\EntityFactory; use Box\Spout\Reader\Exception\IteratorNotRewindableException; use Box\Spout\TestUsingResource; +use PHPUnit\Framework\TestCase; /** * Class ReaderTest */ -class ReaderTest extends \PHPUnit_Framework_TestCase +class ReaderTest extends TestCase { use TestUsingResource; diff --git a/tests/Spout/Reader/ODS/SheetTest.php b/tests/Spout/Reader/ODS/SheetTest.php index 410e0a0..b89c414 100644 --- a/tests/Spout/Reader/ODS/SheetTest.php +++ b/tests/Spout/Reader/ODS/SheetTest.php @@ -5,11 +5,12 @@ namespace Box\Spout\Reader\ODS; use Box\Spout\Common\Type; use Box\Spout\Reader\Common\Creator\EntityFactory; use Box\Spout\TestUsingResource; +use PHPUnit\Framework\TestCase; /** * Class SheetTest */ -class SheetTest extends \PHPUnit_Framework_TestCase +class SheetTest extends TestCase { use TestUsingResource; diff --git a/tests/Spout/Reader/ReaderFactoryTest.php b/tests/Spout/Reader/ReaderFactoryTest.php index 46495da..507cae3 100644 --- a/tests/Spout/Reader/ReaderFactoryTest.php +++ b/tests/Spout/Reader/ReaderFactoryTest.php @@ -3,11 +3,12 @@ namespace Box\Spout\Reader; use Box\Spout\Common\Exception\UnsupportedTypeException; +use PHPUnit\Framework\TestCase; /** * Class ReaderFactoryTest */ -class ReaderFactoryTest extends \PHPUnit_Framework_TestCase +class ReaderFactoryTest extends TestCase { /** * @return void diff --git a/tests/Spout/Reader/Wrapper/XMLReaderTest.php b/tests/Spout/Reader/Wrapper/XMLReaderTest.php index 2f070e7..077efbf 100644 --- a/tests/Spout/Reader/Wrapper/XMLReaderTest.php +++ b/tests/Spout/Reader/Wrapper/XMLReaderTest.php @@ -4,11 +4,12 @@ namespace Box\Spout\Reader\Wrapper; use Box\Spout\Reader\Exception\XMLProcessingException; use Box\Spout\TestUsingResource; +use PHPUnit\Framework\TestCase; /** * Class XMLReaderTest */ -class XMLReaderTest extends \PHPUnit_Framework_TestCase +class XMLReaderTest extends TestCase { use TestUsingResource; diff --git a/tests/Spout/Reader/XLSX/Helper/CellHelperTest.php b/tests/Spout/Reader/XLSX/Helper/CellHelperTest.php index a322bc6..87a65a6 100644 --- a/tests/Spout/Reader/XLSX/Helper/CellHelperTest.php +++ b/tests/Spout/Reader/XLSX/Helper/CellHelperTest.php @@ -3,11 +3,12 @@ namespace Box\Spout\Reader\XLSX\Helper; use Box\Spout\Common\Exception\InvalidArgumentException; +use PHPUnit\Framework\TestCase; /** * Class CellHelperTest */ -class CellHelperTest extends \PHPUnit_Framework_TestCase +class CellHelperTest extends TestCase { /** * @return array diff --git a/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php b/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php index 86322ee..34508b0 100644 --- a/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php +++ b/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php @@ -5,11 +5,12 @@ namespace Box\Spout\Reader\XLSX\Helper; use Box\Spout\Common\Helper\Escaper; use Box\Spout\Reader\Exception\InvalidValueException; use Box\Spout\Reader\XLSX\Manager\StyleManager; +use PHPUnit\Framework\TestCase; /** * Class CellValueFormatterTest */ -class CellValueFormatterTest extends \PHPUnit_Framework_TestCase +class CellValueFormatterTest extends TestCase { /** * @return array diff --git a/tests/Spout/Reader/XLSX/Helper/DateFormatHelperTest.php b/tests/Spout/Reader/XLSX/Helper/DateFormatHelperTest.php index 5d7eef2..b2aea22 100644 --- a/tests/Spout/Reader/XLSX/Helper/DateFormatHelperTest.php +++ b/tests/Spout/Reader/XLSX/Helper/DateFormatHelperTest.php @@ -2,10 +2,12 @@ namespace Box\Spout\Reader\XLSX\Helper; +use PHPUnit\Framework\TestCase; + /** * Class DateFormatHelperTest */ -class DateFormatHelperTest extends \PHPUnit_Framework_TestCase +class DateFormatHelperTest extends TestCase { /** * @return array diff --git a/tests/Spout/Reader/XLSX/Manager/SharedStringsCaching/CachingStrategyFactoryTest.php b/tests/Spout/Reader/XLSX/Manager/SharedStringsCaching/CachingStrategyFactoryTest.php index 51db365..807daf7 100644 --- a/tests/Spout/Reader/XLSX/Manager/SharedStringsCaching/CachingStrategyFactoryTest.php +++ b/tests/Spout/Reader/XLSX/Manager/SharedStringsCaching/CachingStrategyFactoryTest.php @@ -3,11 +3,12 @@ namespace Box\Spout\Reader\XLSX\Manager\SharedStringsCaching; use Box\Spout\Reader\XLSX\Creator\HelperFactory; +use PHPUnit\Framework\TestCase; /** * Class CachingStrategyFactoryTest */ -class CachingStrategyFactoryTest extends \PHPUnit_Framework_TestCase +class CachingStrategyFactoryTest extends TestCase { /** * @return array diff --git a/tests/Spout/Reader/XLSX/Manager/SharedStringsManagerTest.php b/tests/Spout/Reader/XLSX/Manager/SharedStringsManagerTest.php index d36cc95..2f85f34 100644 --- a/tests/Spout/Reader/XLSX/Manager/SharedStringsManagerTest.php +++ b/tests/Spout/Reader/XLSX/Manager/SharedStringsManagerTest.php @@ -10,11 +10,12 @@ use Box\Spout\Reader\XLSX\Manager\SharedStringsCaching\CachingStrategyFactory; use Box\Spout\Reader\XLSX\Manager\SharedStringsCaching\FileBasedStrategy; use Box\Spout\Reader\XLSX\Manager\SharedStringsCaching\InMemoryStrategy; use Box\Spout\TestUsingResource; +use PHPUnit\Framework\TestCase; /** * Class SharedStringsManagerTest */ -class SharedStringsManagerTest extends \PHPUnit_Framework_TestCase +class SharedStringsManagerTest extends TestCase { use TestUsingResource; diff --git a/tests/Spout/Reader/XLSX/Manager/StyleManagerTest.php b/tests/Spout/Reader/XLSX/Manager/StyleManagerTest.php index 4dd630c..a8aa190 100644 --- a/tests/Spout/Reader/XLSX/Manager/StyleManagerTest.php +++ b/tests/Spout/Reader/XLSX/Manager/StyleManagerTest.php @@ -3,11 +3,12 @@ namespace Box\Spout\Reader\XLSX\Manager; use Box\Spout\Reader\XLSX\Creator\InternalEntityFactory; +use PHPUnit\Framework\TestCase; /** * Class StyleManagerTest */ -class StyleManagerTest extends \PHPUnit_Framework_TestCase +class StyleManagerTest extends TestCase { /** * @param array $styleAttributes diff --git a/tests/Spout/Reader/XLSX/ReaderTest.php b/tests/Spout/Reader/XLSX/ReaderTest.php index 8b35f0e..1b065c2 100644 --- a/tests/Spout/Reader/XLSX/ReaderTest.php +++ b/tests/Spout/Reader/XLSX/ReaderTest.php @@ -6,11 +6,12 @@ use Box\Spout\Common\Exception\IOException; use Box\Spout\Common\Type; use Box\Spout\Reader\Common\Creator\EntityFactory; use Box\Spout\TestUsingResource; +use PHPUnit\Framework\TestCase; /** * Class ReaderTest */ -class ReaderTest extends \PHPUnit_Framework_TestCase +class ReaderTest extends TestCase { use TestUsingResource; diff --git a/tests/Spout/Reader/XLSX/SheetTest.php b/tests/Spout/Reader/XLSX/SheetTest.php index 554397c..735a35d 100644 --- a/tests/Spout/Reader/XLSX/SheetTest.php +++ b/tests/Spout/Reader/XLSX/SheetTest.php @@ -5,11 +5,12 @@ namespace Box\Spout\Reader\XLSX; use Box\Spout\Common\Type; use Box\Spout\Reader\Common\Creator\EntityFactory; use Box\Spout\TestUsingResource; +use PHPUnit\Framework\TestCase; /** * Class SheetTest */ -class SheetTest extends \PHPUnit_Framework_TestCase +class SheetTest extends TestCase { use TestUsingResource; diff --git a/tests/Spout/Writer/CSV/WriterTest.php b/tests/Spout/Writer/CSV/WriterTest.php index d10d0b3..a13d545 100644 --- a/tests/Spout/Writer/CSV/WriterTest.php +++ b/tests/Spout/Writer/CSV/WriterTest.php @@ -11,11 +11,12 @@ use Box\Spout\TestUsingResource; use Box\Spout\Writer\Common\Creator\EntityFactory; use Box\Spout\Writer\Exception\WriterNotOpenedException; use Box\Spout\Writer\RowCreationHelper; +use PHPUnit\Framework\TestCase; /** * Class WriterTest */ -class WriterTest extends \PHPUnit_Framework_TestCase +class WriterTest extends TestCase { use TestUsingResource; use RowCreationHelper; diff --git a/tests/Spout/Writer/Common/Creator/StyleBuilderTest.php b/tests/Spout/Writer/Common/Creator/StyleBuilderTest.php index cbe6003..17cdc69 100644 --- a/tests/Spout/Writer/Common/Creator/StyleBuilderTest.php +++ b/tests/Spout/Writer/Common/Creator/StyleBuilderTest.php @@ -5,11 +5,12 @@ namespace Box\Spout\Writer\Common\Creator\Style; use Box\Spout\Common\Entity\Style\Border; use Box\Spout\Common\Entity\Style\Color; use Box\Spout\Writer\Common\Manager\Style\StyleMerger; +use PHPUnit\Framework\TestCase; /** * Class StyleManagerTest */ -class StyleBuilderTest extends \PHPUnit_Framework_TestCase +class StyleBuilderTest extends TestCase { /** * @return void diff --git a/tests/Spout/Writer/Common/Creator/WriterFactoryTest.php b/tests/Spout/Writer/Common/Creator/WriterFactoryTest.php index d448b3e..ee6c375 100644 --- a/tests/Spout/Writer/Common/Creator/WriterFactoryTest.php +++ b/tests/Spout/Writer/Common/Creator/WriterFactoryTest.php @@ -3,11 +3,12 @@ namespace Box\Spout\Writer\Common\Creator; use Box\Spout\Common\Exception\UnsupportedTypeException; +use PHPUnit\Framework\TestCase; /** * Class WriterFactoryTest */ -class WriterFactoryTest extends \PHPUnit_Framework_TestCase +class WriterFactoryTest extends TestCase { /** * @return void diff --git a/tests/Spout/Writer/Common/Entity/SheetTest.php b/tests/Spout/Writer/Common/Entity/SheetTest.php index c78ef0f..85299f0 100644 --- a/tests/Spout/Writer/Common/Entity/SheetTest.php +++ b/tests/Spout/Writer/Common/Entity/SheetTest.php @@ -5,11 +5,12 @@ namespace Box\Spout\Writer\Common\Entity; use Box\Spout\Common\Helper\StringHelper; use Box\Spout\Writer\Common\Manager\SheetManager; use Box\Spout\Writer\Exception\InvalidSheetNameException; +use PHPUnit\Framework\TestCase; /** * Class SheetTest */ -class SheetTest extends \PHPUnit_Framework_TestCase +class SheetTest extends TestCase { /** @var SheetManager */ private $sheetManager; diff --git a/tests/Spout/Writer/Common/Helper/CellHelperTest.php b/tests/Spout/Writer/Common/Helper/CellHelperTest.php index f763200..d699bc0 100644 --- a/tests/Spout/Writer/Common/Helper/CellHelperTest.php +++ b/tests/Spout/Writer/Common/Helper/CellHelperTest.php @@ -2,10 +2,12 @@ namespace Box\Spout\Writer\Common\Helper; +use PHPUnit\Framework\TestCase; + /** * Class CellHelperTest */ -class CellHelperTest extends \PHPUnit_Framework_TestCase +class CellHelperTest extends TestCase { /** * @return array diff --git a/tests/Spout/Writer/Common/Manager/Style/StyleManagerTest.php b/tests/Spout/Writer/Common/Manager/Style/StyleManagerTest.php index 81f3477..82292bb 100644 --- a/tests/Spout/Writer/Common/Manager/Style/StyleManagerTest.php +++ b/tests/Spout/Writer/Common/Manager/Style/StyleManagerTest.php @@ -4,11 +4,12 @@ namespace Box\Spout\Writer\Common\Manager\Style; use Box\Spout\Common\Entity\Cell; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; +use PHPUnit\Framework\TestCase; /** * Class StyleManagerTest */ -class StyleManagerTest extends \PHPUnit_Framework_TestCase +class StyleManagerTest extends TestCase { /** * @return StyleManager diff --git a/tests/Spout/Writer/Common/Manager/Style/StyleMergerTest.php b/tests/Spout/Writer/Common/Manager/Style/StyleMergerTest.php index 6ca3232..da49724 100644 --- a/tests/Spout/Writer/Common/Manager/Style/StyleMergerTest.php +++ b/tests/Spout/Writer/Common/Manager/Style/StyleMergerTest.php @@ -5,11 +5,12 @@ namespace Box\Spout\Writer\Common\Manager\Style; use Box\Spout\Common\Entity\Style\Color; use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; +use PHPUnit\Framework\TestCase; /** * Class StyleMergerTest */ -class StyleMergerTest extends \PHPUnit_Framework_TestCase +class StyleMergerTest extends TestCase { /** @var StyleMerger */ private $styleMerger; diff --git a/tests/Spout/Writer/Common/Manager/Style/StyleRegistryTest.php b/tests/Spout/Writer/Common/Manager/Style/StyleRegistryTest.php index 4a25f34..41cc571 100644 --- a/tests/Spout/Writer/Common/Manager/Style/StyleRegistryTest.php +++ b/tests/Spout/Writer/Common/Manager/Style/StyleRegistryTest.php @@ -4,11 +4,12 @@ namespace Box\Spout\Writer\Common\Manager\Style; use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; +use PHPUnit\Framework\TestCase; /** * Class StyleRegistryTest */ -class StyleRegistryTest extends \PHPUnit_Framework_TestCase +class StyleRegistryTest extends TestCase { /** @var Style */ private $defaultStyle; diff --git a/tests/Spout/Writer/ODS/Manager/Style/StyleRegistryTest.php b/tests/Spout/Writer/ODS/Manager/Style/StyleRegistryTest.php index ae3ecf4..46640ce 100644 --- a/tests/Spout/Writer/ODS/Manager/Style/StyleRegistryTest.php +++ b/tests/Spout/Writer/ODS/Manager/Style/StyleRegistryTest.php @@ -3,11 +3,12 @@ namespace Box\Spout\Writer\ODS\Manager\Style; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; +use PHPUnit\Framework\TestCase; /** * Class StyleRegistryTest */ -class StyleRegistryTest extends \PHPUnit_Framework_TestCase +class StyleRegistryTest extends TestCase { /** * @return StyleRegistry diff --git a/tests/Spout/Writer/ODS/SheetTest.php b/tests/Spout/Writer/ODS/SheetTest.php index 52cf7aa..aba94a1 100644 --- a/tests/Spout/Writer/ODS/SheetTest.php +++ b/tests/Spout/Writer/ODS/SheetTest.php @@ -8,11 +8,12 @@ use Box\Spout\Writer\Common\Creator\EntityFactory; use Box\Spout\Writer\Common\Entity\Sheet; use Box\Spout\Writer\Exception\InvalidSheetNameException; use Box\Spout\Writer\RowCreationHelper; +use PHPUnit\Framework\TestCase; /** * Class SheetTest */ -class SheetTest extends \PHPUnit_Framework_TestCase +class SheetTest extends TestCase { use TestUsingResource; use RowCreationHelper; diff --git a/tests/Spout/Writer/ODS/WriterTest.php b/tests/Spout/Writer/ODS/WriterTest.php index d2b3bdf..f725f4f 100644 --- a/tests/Spout/Writer/ODS/WriterTest.php +++ b/tests/Spout/Writer/ODS/WriterTest.php @@ -14,11 +14,12 @@ use Box\Spout\Writer\Common\Helper\ZipHelper; use Box\Spout\Writer\Exception\WriterAlreadyOpenedException; use Box\Spout\Writer\Exception\WriterNotOpenedException; use Box\Spout\Writer\RowCreationHelper; +use PHPUnit\Framework\TestCase; /** * Class WriterTest */ -class WriterTest extends \PHPUnit_Framework_TestCase +class WriterTest extends TestCase { use TestUsingResource; use RowCreationHelper; @@ -135,7 +136,7 @@ class WriterTest extends \PHPUnit_Framework_TestCase $writer->addRows($dataRows); $this->fail('Exception should have been thrown'); } catch (SpoutException $e) { - $this->assertFalse(file_exists($fileName), 'Output file should have been deleted'); + $this->assertFileNotExists($fileName, 'Output file should have been deleted'); $numFiles = iterator_count(new \FilesystemIterator($tempFolderPath, \FilesystemIterator::SKIP_DOTS)); $this->assertEquals(0, $numFiles, 'All temp files should have been deleted'); diff --git a/tests/Spout/Writer/ODS/WriterWithStyleTest.php b/tests/Spout/Writer/ODS/WriterWithStyleTest.php index a90bb6c..434b108 100644 --- a/tests/Spout/Writer/ODS/WriterWithStyleTest.php +++ b/tests/Spout/Writer/ODS/WriterWithStyleTest.php @@ -14,11 +14,12 @@ use Box\Spout\Writer\Common\Creator\Style\BorderBuilder; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; use Box\Spout\Writer\Exception\WriterNotOpenedException; use Box\Spout\Writer\RowCreationHelper; +use PHPUnit\Framework\TestCase; /** * Class WriterWithStyleTest */ -class WriterWithStyleTest extends \PHPUnit_Framework_TestCase +class WriterWithStyleTest extends TestCase { use TestUsingResource; use RowCreationHelper; diff --git a/tests/Spout/Writer/XLSX/Manager/Style/StyleManagerTest.php b/tests/Spout/Writer/XLSX/Manager/Style/StyleManagerTest.php index 733e4a2..3bb0f42 100644 --- a/tests/Spout/Writer/XLSX/Manager/Style/StyleManagerTest.php +++ b/tests/Spout/Writer/XLSX/Manager/Style/StyleManagerTest.php @@ -2,10 +2,12 @@ namespace Box\Spout\Writer\XLSX\Manager\Style; +use PHPUnit\Framework\TestCase; + /** * Class StyleManagerTest */ -class StyleManagerTest extends \PHPUnit_Framework_TestCase +class StyleManagerTest extends TestCase { /** * @return array diff --git a/tests/Spout/Writer/XLSX/Manager/Style/StyleRegistryTest.php b/tests/Spout/Writer/XLSX/Manager/Style/StyleRegistryTest.php index bea7683..13a43f4 100644 --- a/tests/Spout/Writer/XLSX/Manager/Style/StyleRegistryTest.php +++ b/tests/Spout/Writer/XLSX/Manager/Style/StyleRegistryTest.php @@ -5,11 +5,12 @@ namespace Box\Spout\Writer\XLSX\Manager\Style; use Box\Spout\Common\Entity\Style\Color; use Box\Spout\Writer\Common\Creator\Style\BorderBuilder; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; +use PHPUnit\Framework\TestCase; /** * Class StyleRegistryTest */ -class StyleRegistryTest extends \PHPUnit_Framework_TestCase +class StyleRegistryTest extends TestCase { /** * @return StyleRegistry diff --git a/tests/Spout/Writer/XLSX/SheetTest.php b/tests/Spout/Writer/XLSX/SheetTest.php index 9e71563..1e845a7 100644 --- a/tests/Spout/Writer/XLSX/SheetTest.php +++ b/tests/Spout/Writer/XLSX/SheetTest.php @@ -8,11 +8,12 @@ use Box\Spout\Writer\Common\Creator\EntityFactory; use Box\Spout\Writer\Common\Entity\Sheet; use Box\Spout\Writer\Exception\InvalidSheetNameException; use Box\Spout\Writer\RowCreationHelper; +use PHPUnit\Framework\TestCase; /** * Class SheetTest */ -class SheetTest extends \PHPUnit_Framework_TestCase +class SheetTest extends TestCase { use TestUsingResource; use RowCreationHelper; diff --git a/tests/Spout/Writer/XLSX/WriterTest.php b/tests/Spout/Writer/XLSX/WriterTest.php index bd4512c..4146b31 100644 --- a/tests/Spout/Writer/XLSX/WriterTest.php +++ b/tests/Spout/Writer/XLSX/WriterTest.php @@ -13,11 +13,12 @@ use Box\Spout\Writer\Exception\WriterAlreadyOpenedException; use Box\Spout\Writer\Exception\WriterNotOpenedException; use Box\Spout\Writer\RowCreationHelper; use Box\Spout\Writer\XLSX\Manager\WorksheetManager; +use PHPUnit\Framework\TestCase; /** * Class WriterTest */ -class WriterTest extends \PHPUnit_Framework_TestCase +class WriterTest extends TestCase { use TestUsingResource; use RowCreationHelper; @@ -166,7 +167,7 @@ class WriterTest extends \PHPUnit_Framework_TestCase $writer->addRows($dataRows); $this->fail('Exception should have been thrown'); } catch (SpoutException $e) { - $this->assertFalse(file_exists($fileName), 'Output file should have been deleted'); + $this->assertFileNotExists($fileName, 'Output file should have been deleted'); $numFiles = iterator_count(new \FilesystemIterator($tempFolderPath, \FilesystemIterator::SKIP_DOTS)); $this->assertEquals(0, $numFiles, 'All temp files should have been deleted'); diff --git a/tests/Spout/Writer/XLSX/WriterWithStyleTest.php b/tests/Spout/Writer/XLSX/WriterWithStyleTest.php index 50410db..ff9fea3 100644 --- a/tests/Spout/Writer/XLSX/WriterWithStyleTest.php +++ b/tests/Spout/Writer/XLSX/WriterWithStyleTest.php @@ -17,11 +17,12 @@ use Box\Spout\Writer\Common\Manager\Style\StyleMerger; use Box\Spout\Writer\Exception\WriterNotOpenedException; use Box\Spout\Writer\RowCreationHelper; use Box\Spout\Writer\XLSX\Manager\OptionsManager; +use PHPUnit\Framework\TestCase; /** * Class WriterWithStyleTest */ -class WriterWithStyleTest extends \PHPUnit_Framework_TestCase +class WriterWithStyleTest extends TestCase { use TestUsingResource; use RowCreationHelper;