PhpSpreadsheet/tests/PhpSpreadsheetTests/Shared/FileTest.php

32 lines
793 B
PHP
Raw Normal View History

<?php
namespace PhpSpreadsheetTests\Shared;
use PhpSpreadsheet\Shared\File;
2016-03-22 14:35:50 +00:00
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();
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result);
}
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();
2015-05-17 13:00:02 +00:00
$this->assertEquals($useUploadTempDirectoryValue, $result);
}
}
}