PhpSpreadsheet/tests/PhpSpreadsheetTests/Shared/FileTest.php

33 lines
842 B
PHP
Raw Normal View History

<?php
namespace PhpOffice\PhpSpreadsheetTests\Shared;
use PhpOffice\PhpSpreadsheet\Shared\File;
use PHPUnit_Framework_TestCase;
class FileTest extends PHPUnit_Framework_TestCase
{
2015-05-17 13:00:02 +00:00
public function testGetUseUploadTempDirectory()
{
2015-05-17 16:34:30 +00:00
$expectedResult = false;
2015-05-17 13:00:02 +00:00
$result = File::getUseUploadTempDirectory();
self::assertEquals($expectedResult, $result);
2015-05-17 13:00:02 +00:00
}
public function testSetUseUploadTempDirectory()
{
$useUploadTempDirectoryValues = [
2015-05-17 13:00:02 +00:00
true,
false,
];
2015-05-17 13:00:02 +00:00
foreach ($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) {
File::setUseUploadTempDirectory($useUploadTempDirectoryValue);
2015-05-17 13:00:02 +00:00
$result = File::getUseUploadTempDirectory();
self::assertEquals($useUploadTempDirectoryValue, $result);
2015-05-17 13:00:02 +00:00
}
}
}