Support PHPUnit 6

This commit is contained in:
Gabriel Caruso authored and Adrien Loison committed 2017-11-27 00:24:13 +01:00
1 parent cd0831ea8e
commit 0efdf48119
41 files changed
+88 -43

No files matched your search

+3 -2
View File
@@ -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');