]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: missing argument for TextProcessing Manager 39774/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Wed, 2 Aug 2023 22:20:35 +0000 (00:20 +0200)
committerMarcel Klehr <mklehr@gmx.net>
Wed, 9 Aug 2023 08:40:51 +0000 (10:40 +0200)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
tests/lib/TextProcessing/TextProcessingTest.php

index 797571019cebb30e3079256acb9ab50d9d046ff2..790593bac23a73378422e56b526975b7d8072a7d 100644 (file)
@@ -21,6 +21,7 @@ use OCP\AppFramework\Db\DoesNotExistException;
 use OCP\AppFramework\Utility\ITimeFactory;
 use OCP\Common\Exception\NotFoundException;
 use OCP\EventDispatcher\IEventDispatcher;
+use OCP\IConfig;
 use OCP\IServerContainer;
 use OCP\TextProcessing\Events\TaskFailedEvent;
 use OCP\TextProcessing\Events\TaskSuccessfulEvent;
@@ -157,12 +158,18 @@ class TextProcessingTest extends \Test\TestCase {
                $this->jobList->expects($this->any())->method('add')->willReturnCallback(function () {
                });
 
+               $config = $this->createMock(IConfig::class);
+               $config->method('getAppValue')
+                       ->with('core', 'ai.textprocessing_provider_preferences', '')
+                       ->willReturn('');
+
                $this->manager = new Manager(
                        $this->serverContainer,
                        $this->coordinator,
                        \OC::$server->get(LoggerInterface::class),
                        $this->jobList,
                        $this->taskMapper,
+                       $config
                );
        }