Skip to content
Snippets Groups Projects
Commit 96ce480c authored by Wouter Wolters's avatar Wouter Wolters Committed by Benni Mack
Browse files

[BUGFIX] Fix FileSpoolTest creating "spool" directory on root level

The FileSpoolTest is creating a directory "spool" on root level.
Unit tests should never create directories on the root level of
TYPO3 project. Instead use `Environment::getVarPath()` as path.

Resolves: #94858
Releases: master,10.4
Change-Id: I04d1aa246d496b175361f22aa49ed2ac8fec3853
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70520


Reviewed-by: default avatarSimon Gilli <typo3@gilbertsoft.org>
Reviewed-by: default avatarRudy Gnodde <rudy@famouswolf.com>
Reviewed-by: default avatarMarcin Sągol <marcin@soee.pl>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarSimon Gilli <typo3@gilbertsoft.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarMarcin Sągol <marcin@soee.pl>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent 4a3500d8
Branches
Tags
No related merge requests found
......@@ -21,6 +21,7 @@ use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\Transport\NullTransport;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\RawMessage;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Mail\FileSpool;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
......@@ -45,7 +46,7 @@ class FileSpoolTest extends UnitTestCase
protected function setUp(): void
{
parent::setUp();
$this->subject = new FileSpool('./spool');
$this->subject = new FileSpool(Environment::getVarPath() . '/spool/');
$this->subject->setMessageLimit(10);
$this->subject->setTimeLimit(1);
}
......
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