PhpSpreadsheet/tests/PhpSpreadsheetTests/Shared/FileTest.php

33 lines
842 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Shared;
use PhpOffice\PhpSpreadsheet\Shared\File;
use PHPUnit_Framework_TestCase;
class FileTest extends PHPUnit_Framework_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);
}
}
}