PhpSpreadsheet/tests/PhpSpreadsheetTests/Shared/FileTest.php
Gabriel Caruso aed27a0bed Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase (#271)
Use the `PHPUnit\Framework\TestCase` notation instead of `PHPUnit_Framework_TestCase` while extending our TestCases. This will help us migrate to PHPUnit 6, that [no longer support snake case class names](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-6.0.md#changed-1).
2017-11-09 00:48:01 +09:00

33 lines
824 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Shared;
use PhpOffice\PhpSpreadsheet\Shared\File;
use PHPUnit\Framework\TestCase;
class FileTest extends TestCase
{
public function testGetUseUploadTempDirectory()
{
$expectedResult = false;
$result = File::getUseUploadTempDirectory();
self::assertEquals($expectedResult, $result);
}
public function testSetUseUploadTempDirectory()
{
$useUploadTempDirectoryValues = [
true,
false,
];
foreach ($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) {
File::setUseUploadTempDirectory($useUploadTempDirectoryValue);
$result = File::getUseUploadTempDirectory();
self::assertEquals($useUploadTempDirectoryValue, $result);
}
}
}