Commit d7b75d73 authored by Nicole Cordes's avatar Nicole Cordes
Browse files

[BUGFIX] Prevent temp file generation in Unit Test

Running Unit Tests creates file /tmp/typo3.log. On Windows systems
this file is stored on the root of the drive. This patch uses the
defined temp folder for storing the file.

Resolves: #76070
Releases: master, 7.6, 6.2
Change-Id: Id77684e41020feb1a1ecff5051a80d2919250bf8

Reviewed-by: Wouter Wolters's avatarWouter Wolters <>
Tested-by: Wouter Wolters's avatarWouter Wolters <>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <>
Reviewed-by: default avatarSusanne Moog <>
Tested-by: default avatarSusanne Moog <>
parent 61b87af5
......@@ -96,8 +96,9 @@ class FileWriterTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
public function setLogFileAcceptsAbsolutePath()
$writer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Log\Writer\FileWriter::class);
$this->assertAttributeEquals('/tmp/typo3.log', 'logFile', $writer);
$tempFile = rtrim(sys_get_temp_dir(), '/\\') . '/typo3.log';
$this->assertAttributeEquals($tempFile, 'logFile', $writer);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment