fix: use UTC into all dates

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This commit is contained in:
Vitor Mattos 2025-09-02 13:24:26 -03:00
parent 161efb63a5
commit 9dcecdd946
No known key found for this signature in database
GPG key ID: 6FECE2AD4809003A
22 changed files with 28 additions and 60 deletions

View file

@ -64,7 +64,7 @@ class FileElement extends Entity {
*/
public function setCreatedAt($createdAt): void {
if (!$createdAt instanceof \DateTime) {
$createdAt = new \DateTime($createdAt);
$createdAt = new \DateTime($createdAt, new \DateTimeZone('UTC'));
}
$this->createdAt = $createdAt;
$this->markFieldUpdated('createdAt');

View file

@ -54,7 +54,7 @@ class IdentifyMethod extends Entity {
public function setIdentifiedAtDate(null|string|\DateTime $identifiedAtDate): void {
if ($identifiedAtDate) {
if (!$identifiedAtDate instanceof \DateTime) {
$this->identifiedAtDate = new \DateTime($identifiedAtDate);
$this->identifiedAtDate = new \DateTime($identifiedAtDate, new \DateTimeZone('UTC'));
} else {
$this->identifiedAtDate = $identifiedAtDate;
}
@ -80,7 +80,7 @@ class IdentifyMethod extends Entity {
public function setLastAttemptDate(null|string|\DateTime $lastAttemptDate): void {
if ($lastAttemptDate) {
if (!$lastAttemptDate instanceof \DateTime) {
$this->lastAttemptDate = new \DateTime($lastAttemptDate);
$this->lastAttemptDate = new \DateTime($lastAttemptDate, new \DateTimeZone('UTC'));
} else {
$this->lastAttemptDate = $lastAttemptDate;
}

View file

@ -548,7 +548,7 @@ class SignRequestMapper extends QBMapper {
'userId' => $row['user_id'],
'displayName' => $this->userManager->get($row['user_id'])?->getDisplayName(),
];
$row['created_at'] = (new \DateTime($row['created_at']))->format(DateTimeInterface::ATOM);
$row['created_at'] = (new \DateTime($row['created_at']))->setTimezone(new \DateTimeZone('UTC'))->format(DateTimeInterface::ATOM);
$row['file'] = $this->urlGenerator->linkToRoute('libresign.page.getPdf', ['uuid' => $row['uuid']]);
$row['nodeId'] = (int)$row['node_id'];
unset(

View file

@ -59,7 +59,7 @@ class UserElement extends Entity {
*/
public function setCreatedAt($createdAt): void {
if (!$createdAt instanceof \DateTime) {
$createdAt = new \DateTime($createdAt);
$createdAt = new \DateTime($createdAt, new \DateTimeZone('UTC'));
}
$this->createdAt = $createdAt;
$this->markFieldUpdated('createdAt');

View file

@ -17,7 +17,6 @@ use OCA\Libresign\Handler\FooterHandler;
use OCA\Libresign\Service\FolderService;
use OCP\Files\File;
use OCP\IAppConfig;
use OCP\IDateTimeZone;
use OCP\IL10N;
use OCP\ITempManager;
use phpseclib3\File\ASN1;
@ -39,10 +38,9 @@ class Pkcs12Handler extends SignEngineHandler {
private IL10N $l10n,
private FooterHandler $footerHandler,
private ITempManager $tempManager,
private IDateTimeZone $dateTimeZone,
private LoggerInterface $logger,
) {
parent::__construct($l10n, $folderService, $logger, $dateTimeZone);
parent::__construct($l10n, $folderService, $logger);
}
/**

View file

@ -42,7 +42,7 @@ class Pkcs7Handler extends SignEngineHandler {
$lastModifiedTime = filemtime($metadata['uri']);
return [
[
'signingTime' => (new DateTime())->setTimestamp($lastModifiedTime),
'signingTime' => (new DateTime())->setTimestamp($lastModifiedTime)->setTimezone(new \DateTimeZone('UTC')),
],
];
}

View file

@ -21,7 +21,6 @@ use OCP\Files\GenericFileException;
use OCP\Files\InvalidPathException;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\IDateTimeZone;
use OCP\IL10N;
use Psr\Log\LoggerInterface;
@ -38,7 +37,6 @@ abstract class SignEngineHandler implements ISignEngineHandler {
private IL10N $l10n,
private readonly FolderService $folderService,
private LoggerInterface $logger,
private IDateTimeZone $dateTimeZone,
) {
}
@ -221,7 +219,7 @@ abstract class SignEngineHandler implements ISignEngineHandler {
}
// Prevent accepting certificates with future signing dates (possible clock issues)
$dateTime = new \DateTime('now', $this->dateTimeZone->getTimeZone());
$dateTime = new \DateTime('now', new \DateTimeZone('UTC'));
if ($last['signingTime'] > $dateTime) {
$this->logger->error('We found Marty McFly', [
'last_signature' => json_encode($last['signingTime']),

View file

@ -18,7 +18,6 @@ use OCA\Libresign\Service\IdentifyMethod\IIdentifyMethod;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\IDateTimeZone;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserSession;
@ -34,7 +33,6 @@ class NotificationListener implements IEventListener {
private ITimeFactory $timeFactory,
protected IURLGenerator $url,
private SignRequestMapper $signRequestMapper,
private IDateTimeZone $dateTimeZone,
) {
}
@ -77,7 +75,7 @@ class NotificationListener implements IEventListener {
$notification
->setApp(AppInfoApplication::APP_ID)
->setObject('signRequest', (string)$signRequest->getId())
->setDateTime((new \DateTime('now', $this->dateTimeZone->getTimeZone()))->setTimestamp($this->timeFactory->now()->getTimestamp()))
->setDateTime((new \DateTime())->setTimestamp($this->timeFactory->now()->getTimestamp()))
->setUser($identifyMethod->getEntity()->getIdentifierValue());
$isFirstNotification = $this->signRequestMapper->incrementNotificationCounter($signRequest, 'notify');
if ($isFirstNotification) {
@ -123,7 +121,7 @@ class NotificationListener implements IEventListener {
$notification
->setApp(AppInfoApplication::APP_ID)
->setObject('signedFile', (string)$signRequest->getId())
->setDateTime((new \DateTime('now', $this->dateTimeZone->getTimeZone()))->setTimestamp($this->timeFactory->now()->getTimestamp()))
->setDateTime((new \DateTime())->setTimestamp($this->timeFactory->now()->getTimestamp())->setTimezone(new \DateTimeZone('UTC')))
->setUser($actorId)
->setSubject('file_signed', [
'from' => $this->getFromSignedParameter(

View file

@ -87,7 +87,7 @@ class Version12000Date20250325155910 extends SimpleMigrationStep {
$handle = $file->read();
fgetcsv($handle); // header
while (($row = fgetcsv($handle)) !== false) {
$update->setParameter('created_at', new \DateTime('@' . $row[1]), IQueryBuilder::PARAM_DATETIME_MUTABLE)
$update->setParameter('created_at', new \DateTime('@' . $row[1], new \DateTimeZone('UTC')), IQueryBuilder::PARAM_DATETIME_MUTABLE)
->setParameter('id', $row[0]);
$update->executeStatement();
}
@ -109,11 +109,11 @@ class Version12000Date20250325155910 extends SimpleMigrationStep {
$handle = $file->read();
fgetcsv($handle); // header
while (($row = fgetcsv($handle)) !== false) {
$update->setParameter('created_at', new \DateTime('@' . $row[1]), IQueryBuilder::PARAM_DATETIME_MUTABLE)
$update->setParameter('created_at', new \DateTime('@' . $row[1], new \DateTimeZone('UTC')), IQueryBuilder::PARAM_DATETIME_MUTABLE)
->setParameter('id', $row[0]);
if ($row[2]) {
$update->setParameter('signed', new \DateTime('@' . $row[2]), IQueryBuilder::PARAM_DATETIME_MUTABLE);
$update->setParameter('signed', new \DateTime('@' . $row[2], new \DateTimeZone('UTC')), IQueryBuilder::PARAM_DATETIME_MUTABLE);
} else {
$update->setParameter('signed', null, IQueryBuilder::PARAM_NULL);
}

View file

@ -107,8 +107,8 @@ class Version8000Date20230420125331 extends SimpleMigrationStep {
'identifier_key' => $insert->createNamedParameter('account'),
'identifier_value' => $insert->createNamedParameter($row['user_id']),
'attempts' => $insert->createNamedParameter($row['signed'] ? 1 : 0, IQueryBuilder::PARAM_INT),
'identified_at_date' => $insert->createNamedParameter($row['signed'] ? new \DateTime('@' . $row['signed']): null, IQueryBuilder::PARAM_DATE),
'last_attempt_date' => $insert->createNamedParameter($row['signed'] ? new \DateTime('@' . $row['signed']): null, IQueryBuilder::PARAM_DATE),
'identified_at_date' => $insert->createNamedParameter($row['signed'] ? new \DateTime('@' . $row['signed'], new \DateTimeZone('UTC')): null, IQueryBuilder::PARAM_DATE),
'last_attempt_date' => $insert->createNamedParameter($row['signed'] ? new \DateTime('@' . $row['signed'], new \DateTimeZone('UTC')): null, IQueryBuilder::PARAM_DATE),
])
->executeStatement();
}
@ -130,8 +130,8 @@ class Version8000Date20230420125331 extends SimpleMigrationStep {
'identifier_key' => $insert->createNamedParameter('email'),
'identifier_value' => $insert->createNamedParameter($row['email']),
'attempts' => $insert->createNamedParameter($row['signed'] ? 1 : 0, IQueryBuilder::PARAM_INT),
'identified_at_date' => $insert->createNamedParameter($row['signed'] ? new \DateTime('@' . $row['signed']): null, IQueryBuilder::PARAM_DATE),
'last_attempt_date' => $insert->createNamedParameter($row['signed'] ? new \DateTime('@' . $row['signed']): null, IQueryBuilder::PARAM_DATE),
'identified_at_date' => $insert->createNamedParameter($row['signed'] ? new \DateTime('@' . $row['signed'], new \DateTimeZone('UTC')): null, IQueryBuilder::PARAM_DATE),
'last_attempt_date' => $insert->createNamedParameter($row['signed'] ? new \DateTime('@' . $row['signed'], new \DateTimeZone('UTC')): null, IQueryBuilder::PARAM_DATE),
])
->executeStatement();
}

View file

@ -358,7 +358,7 @@ class FileService {
foreach ($metadata['notify'] as $notify) {
$this->fileData->signers[$index]['notify'][] = [
'method' => $notify['method'],
'date' => (new \DateTime('@' . $notify['date']))->format(DateTimeInterface::ATOM),
'date' => (new \DateTime('@' . $notify['date'], new \DateTimeZone('UTC')))->format(DateTimeInterface::ATOM),
];
}
}
@ -429,10 +429,10 @@ class FileService {
$this->fileData->signers[$index]['subject'] = $signer['chain'][0]['name'];
}
if (!empty($signer['chain'][0]['validFrom_time_t'])) {
$this->fileData->signers[$index]['valid_from'] = (new DateTime('@' . $signer['chain'][0]['validFrom_time_t']))->format(DateTimeInterface::ATOM);
$this->fileData->signers[$index]['valid_from'] = (new DateTime('@' . $signer['chain'][0]['validFrom_time_t'], new \DateTimeZone('UTC')))->format(DateTimeInterface::ATOM);
}
if (!empty($signer['chain'][0]['validTo_time_t'])) {
$this->fileData->signers[$index]['valid_to'] = (new DateTime('@' . $signer['chain'][0]['validTo_time_t']))->format(DateTimeInterface::ATOM);
$this->fileData->signers[$index]['valid_to'] = (new DateTime('@' . $signer['chain'][0]['validTo_time_t'], new \DateTimeZone('UTC')))->format(DateTimeInterface::ATOM);
}
if (!empty($signer['signingTime'])) {
$this->fileData->signers[$index]['signed'] = $signer['signingTime']->format(DateTimeInterface::ATOM);

View file

@ -18,7 +18,6 @@ use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\IDateTimeZone;
use OCP\IGroupManager;
use OCP\IL10N;
use OCP\IUser;
@ -31,7 +30,6 @@ class FolderService {
protected IGroupManager $groupManager,
private IAppConfig $appConfig,
private IL10N $l10n,
private IDateTimeZone $dateTimeZone,
private ?string $userId,
) {
$this->userId = $userId;
@ -144,7 +142,7 @@ class FolderService {
foreach ($data['settings']['folderPatterns'] as $pattern) {
switch ($pattern['name']) {
case 'date':
$folderName[] = (new \DateTime('now', $this->dateTimeZone->getTimeZone()))->format($pattern['setting']);
$folderName[] = (new \DateTime('now', new \DateTimeZone('UTC')))->format($pattern['setting']);
break;
case 'name':
if (!empty($data['name'])) {

View file

@ -207,7 +207,7 @@ abstract class AbstractIdentifyMethod implements IIdentifyMethod {
$signRequest = $this->identifyService->getSignRequestMapper()->getById($this->getEntity()->getSignRequestId());
$startTime = $this->identifyService->getSessionService()->getSignStartTime();
if ($startTime > 0) {
$startTime = new DateTime('@' . $startTime);
$startTime = new DateTime('@' . $startTime, new \DateTimeZone('UTC'));
} else {
$startTime = null;
}

View file

@ -20,7 +20,6 @@ use OCP\AppFramework\Db\DoesNotExistException;
use OCP\Files\IMimeTypeDetector;
use OCP\Files\Node;
use OCP\Http\Client\IClientService;
use OCP\IDateTimeZone;
use OCP\IL10N;
use OCP\IUser;
use OCP\IUserManager;
@ -43,7 +42,6 @@ class RequestSignatureService {
protected FolderService $folderService,
protected IMimeTypeDetector $mimeTypeDetector,
protected ValidateHelper $validateHelper,
protected IDateTimeZone $dateTimeZone,
protected IClientService $client,
protected LoggerInterface $logger,
) {
@ -89,7 +87,7 @@ class RequestSignatureService {
$file->setNodeId($node->getId());
$file->setUserId($data['userManager']->getUID());
$file->setUuid(UUIDUtil::getUUID());
$file->setCreatedAt(new \DateTime('now', $this->dateTimeZone->getTimeZone()));
$file->setCreatedAt(new \DateTime('now', new \DateTimeZone('UTC')));
$file->setName($data['name']);
$file->setMetadata($this->getFileMetadata($node));
if (!empty($data['callback'])) {
@ -326,7 +324,7 @@ class RequestSignatureService {
$signRequest->setDescription($description);
}
if (!$signRequest->getId()) {
$signRequest->setCreatedAt(new \DateTime('now', $this->dateTimeZone->getTimeZone()));
$signRequest->setCreatedAt(new \DateTime('now', new \DateTimeZone('UTC')));
}
}

View file

@ -375,7 +375,7 @@ class SignFileService {
'IssuerCommonName' => $certificateData['issuer']['CN'] ?? '',
'SignerCommonName' => $certificateData['subject']['CN'] ?? '',
'LocalSignerTimezone' => $this->dateTimeZone->getTimeZone()->getName(),
'LocalSignerSignatureDateTime' => (new DateTime('now', $this->dateTimeZone->getTimeZone()))
'LocalSignerSignatureDateTime' => (new DateTime('now', new \DateTimeZone('UTC')))
->format(DateTimeInterface::ATOM)
];
}
@ -670,7 +670,7 @@ class SignFileService {
$signRequest->setFileId($libresignFile->getId());
$signRequest->setDisplayName($user->getDisplayName());
$signRequest->setUuid(UUIDUtil::getUUID());
$signRequest->setCreatedAt(new \DateTime('now', $this->dateTimeZone->getTimeZone()));
$signRequest->setCreatedAt(new \DateTime('now', new \DateTimeZone('UTC')));
}
return $signRequest;
}

View file

@ -121,7 +121,7 @@ class SignatureTextService {
];
}
if (empty($context)) {
$date = new \DateTime('now', $this->dateTimeZone->getTimeZone());
$date = new \DateTime('now', new \DateTimeZone('UTC'));
$context = [
'DocumentUUID' => UUIDUtil::getUUID(),
'IssuerCommonName' => 'Acme Cooperative',

View file

@ -128,7 +128,7 @@ class SignerElementsService {
'nodeId' => $fileElement->getId(),
],
'starred' => 0,
'createdAt' => (new \DateTime())->setTimestamp((int)$timestamp)->format('Y-m-d H:i:s'),
'createdAt' => (new \DateTime())->setTimestamp((int)$timestamp)->setTimezone(new \DateTimeZone('UTC'))->format('Y-m-d H:i:s'),
];
}
return $return;

View file

@ -14,7 +14,6 @@ use OCA\Libresign\Service\FolderService;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\IAppConfig;
use OCP\IDateTimeZone;
use OCP\IL10N;
use OCP\ITempManager;
use OCP\L10N\IFactory as IL10NFactory;
@ -29,7 +28,6 @@ final class Pkcs12HandlerTest extends \OCA\Libresign\Tests\Unit\TestCase {
private IL10N $l10n;
private FooterHandler&MockObject $footerHandler;
private ITempManager $tempManager;
private IDateTimeZone $dateTimeZone;
private LoggerInterface&MockObject $logger;
private CertificateEngineFactory&MockObject $certificateEngineFactory;
@ -40,7 +38,6 @@ final class Pkcs12HandlerTest extends \OCA\Libresign\Tests\Unit\TestCase {
$this->l10n = \OCP\Server::get(IL10NFactory::class)->get(Application::APP_ID);
$this->footerHandler = $this->createMock(FooterHandler::class);
$this->tempManager = \OCP\Server::get(ITempManager::class);
$this->dateTimeZone = \OCP\Server::get(IDateTimeZone::class);
$this->logger = $this->createMock(LoggerInterface::class);
}
@ -54,7 +51,6 @@ final class Pkcs12HandlerTest extends \OCA\Libresign\Tests\Unit\TestCase {
$this->l10n,
$this->footerHandler,
$this->tempManager,
$this->dateTimeZone,
$this->logger,
])
->onlyMethods($methods)
@ -67,7 +63,6 @@ final class Pkcs12HandlerTest extends \OCA\Libresign\Tests\Unit\TestCase {
$this->l10n,
$this->footerHandler,
$this->tempManager,
$this->dateTimeZone,
$this->logger,
);
}

View file

@ -8,7 +8,6 @@ declare(strict_types=1);
use OCA\Libresign\Handler\SignEngine\Pkcs7Handler;
use OCA\Libresign\Service\FolderService;
use OCP\IDateTimeZone;
use OCP\IL10N;
use OCP\L10N\IFactory as IL10NFactory;
use PHPUnit\Framework\MockObject\MockObject;
@ -18,13 +17,11 @@ final class Pkcs7HandlerTest extends \OCA\Libresign\Tests\Unit\TestCase {
private IL10N $l10n;
private FolderService&MockObject $folderService;
private LoggerInterface&MockObject $logger;
private IDateTimeZone&MockObject $dateTimeZone;
public function setUp(): void {
parent::setUp();
$this->l10n = \OCP\Server::get(IL10NFactory::class)->get(\OCA\Libresign\AppInfo\Application::APP_ID);
$this->folderService = $this->createMock(\OCA\Libresign\Service\FolderService::class);
$this->logger = $this->createMock(LoggerInterface::class);
$this->dateTimeZone = $this->createMock(IDateTimeZone::class);
}
protected function getInstance(array $methods = []): Pkcs7Handler|MockObject {
@ -33,7 +30,6 @@ final class Pkcs7HandlerTest extends \OCA\Libresign\Tests\Unit\TestCase {
$this->l10n,
$this->folderService,
$this->logger,
$this->dateTimeZone,
);
}
return $this->getMockBuilder(Pkcs7Handler::class)
@ -41,7 +37,6 @@ final class Pkcs7HandlerTest extends \OCA\Libresign\Tests\Unit\TestCase {
$this->l10n,
$this->folderService,
$this->logger,
$this->dateTimeZone,
])
->onlyMethods($methods)
->getMock();

View file

@ -17,7 +17,6 @@ use OCP\Files\IAppData;
use OCP\Files\IRootFolder;
use OCP\Files\SimpleFS\ISimpleFile;
use OCP\Files\SimpleFS\ISimpleFolder;
use OCP\IDateTimeZone;
use OCP\IGroupManager;
use OCP\IL10N;
use OCP\IUser;
@ -65,7 +64,6 @@ final class FolderServiceTest extends \OCA\Libresign\Tests\Unit\TestCase {
private IGroupManager&MockObject $groupManager;
private IAppConfig&MockObject $appConfig;
private IL10N&MockObject $l10n;
private IDateTimeZone&MockObject $dateTimeZone;
public function setUp(): void {
parent::setUp();
@ -74,7 +72,6 @@ final class FolderServiceTest extends \OCA\Libresign\Tests\Unit\TestCase {
$this->groupManager = $this->createMock(IGroupManager::class);
$this->appConfig = $this->createMock(IAppConfig::class);
$this->l10n = $this->createMock(IL10N::class);
$this->dateTimeZone = $this->createMock(IDateTimeZone::class);
}
private function getInstance(?string $userId = '171'): FolderService {
@ -84,7 +81,6 @@ final class FolderServiceTest extends \OCA\Libresign\Tests\Unit\TestCase {
$this->groupManager,
$this->appConfig,
$this->l10n,
$this->dateTimeZone,
$userId
);
return $service;

View file

@ -17,7 +17,6 @@ use OCA\Libresign\Service\FolderService;
use OCA\Libresign\Service\IdentifyMethod\IdentifyService;
use OCA\Libresign\Service\IdentifyMethod\SignatureMethod\Password;
use OCP\IAppConfig;
use OCP\IDateTimeZone;
use OCP\IL10N;
use OCP\ITempManager;
use OCP\IUserSession;
@ -35,7 +34,6 @@ final class PasswordTest extends \OCA\Libresign\Tests\Unit\TestCase {
private CertificateEngineFactory&MockObject $certificateEngineFactory;
private IL10N $l10n;
private FooterHandler&MockObject $footerHandler;
private IDateTimeZone $dateTimeZone;
private ITempManager $tempManager;
private LoggerInterface&MockObject $logger;
@ -49,7 +47,6 @@ final class PasswordTest extends \OCA\Libresign\Tests\Unit\TestCase {
$this->tempManager = \OCP\Server::get(ITempManager::class);
$this->userSession = $this->createMock(IUserSession::class);
$this->logger = $this->createMock(LoggerInterface::class);
$this->dateTimeZone = \OCP\Server::get(IDateTimeZone::class);
$this->pkcs12Handler = $this->getPkcs12Instance();
}
@ -73,7 +70,6 @@ final class PasswordTest extends \OCA\Libresign\Tests\Unit\TestCase {
$this->l10n,
$this->footerHandler,
$this->tempManager,
$this->dateTimeZone,
$this->logger,
])
->onlyMethods($methods)

View file

@ -21,7 +21,6 @@ use OCP\Files\IMimeTypeDetector;
use OCP\Http\Client\IClient;
use OCP\Http\Client\IClientService;
use OCP\Http\Client\IResponse;
use OCP\IDateTimeZone;
use OCP\IL10N;
use OCP\IUser;
use OCP\IUserManager;
@ -43,7 +42,6 @@ final class RequestSignatureServiceTest extends \OCA\Libresign\Tests\Unit\TestCa
private IdentifyMethodService&MockObject $identifyMethodService;
private PdfParserService&MockObject $pdfParserService;
private IMimeTypeDetector&MockObject $mimeTypeDetector;
private IDateTimeZone&MockObject $dateTimeZone;
private IClientService&MockObject $client;
private LoggerInterface&MockObject $loggerInterface;
@ -67,7 +65,6 @@ final class RequestSignatureServiceTest extends \OCA\Libresign\Tests\Unit\TestCa
$this->identifyMethodService = $this->createMock(IdentifyMethodService::class);
$this->pdfParserService = $this->createMock(PdfParserService::class);
$this->mimeTypeDetector = $this->createMock(IMimeTypeDetector::class);
$this->dateTimeZone = $this->createMock(IDateTimeZone::class);
$this->client = $this->createMock(IClientService::class);
$this->loggerInterface = $this->createMock(LoggerInterface::class);
}
@ -86,7 +83,6 @@ final class RequestSignatureServiceTest extends \OCA\Libresign\Tests\Unit\TestCa
$this->folderService,
$this->mimeTypeDetector,
$this->validateHelper,
$this->dateTimeZone,
$this->client,
$this->loggerInterface
);