Merge pull request #5097 from LibreSign/chore/use-method-to-get-app-config

chore: use method that get app config
This commit is contained in:
Samuelson Brito 2025-06-05 10:18:03 -04:00 committed by GitHub
commit 303aaea0aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 12 deletions

View file

@ -11,7 +11,6 @@ use OCA\Libresign\Handler\CertificateEngine\CertificateEngineFactory;
use OCA\Libresign\Handler\FooterHandler;
use OCA\Libresign\Handler\SignEngine\Pkcs12Handler;
use OCA\Libresign\Service\FolderService;
use OCA\Libresign\Tests\lib\AppConfigOverwrite;
use OCP\IAppConfig;
use OCP\IL10N;
use OCP\ITempManager;
@ -29,11 +28,7 @@ final class Pkcs12HandlerTest extends \OCA\Libresign\Tests\Unit\TestCase {
public function setUp(): void {
$this->folderService = $this->createMock(FolderService::class);
$this->appConfig = new AppConfigOverwrite(
$this->createMock(\OCP\IDBConnection::class),
\OCP\Server::get(\Psr\Log\LoggerInterface::class),
\OCP\Server::get(\OCP\Security\ICrypto::class),
);
$this->appConfig = $this->getMockAppConfig();
$this->certificateEngineFactory = $this->createMock(CertificateEngineFactory::class);
$this->l10n = \OCP\Server::get(IL10NFactory::class)->get(Application::APP_ID);
$this->footerHandler = $this->createMock(FooterHandler::class);

View file

@ -33,7 +33,6 @@ use OCA\Libresign\Service\FileService;
use OCA\Libresign\Service\FolderService;
use OCA\Libresign\Service\IdentifyMethodService;
use OCA\Libresign\Service\PdfParserService;
use OCA\Libresign\Tests\lib\AppConfigOverwrite;
use OCP\Accounts\IAccountManager;
use OCP\Files\IMimeTypeDetector;
use OCP\Files\IRootFolder;
@ -98,11 +97,7 @@ final class FileServiceTest extends \OCA\Libresign\Tests\Unit\TestCase {
$this->accountManager = $this->createMock(IAccountManager::class);
$this->client = \OCP\Server::get(IClientService::class);
$this->dateTimeFormatter = \OCP\Server::get(IDateTimeFormatter::class);
$this->appConfig = new AppConfigOverwrite(
$this->createMock(\OCP\IDBConnection::class),
\OCP\Server::get(\Psr\Log\LoggerInterface::class),
\OCP\Server::get(\OCP\Security\ICrypto::class),
);
$this->appConfig = $this->getMockAppConfig();
$this->urlGenerator = \OCP\Server::get(IURLGenerator::class);
$this->mimeTypeDetector = \OCP\Server::get(IMimeTypeDetector::class);
$this->pkcs12Handler = \OCP\Server::get(Pkcs12Handler::class);