From 9fce3d3072ff3f994db6033fe3876d9d4174379c Mon Sep 17 00:00:00 2001 From: Jana Peper Date: Wed, 11 Dec 2024 09:19:16 +0100 Subject: [PATCH] test: add disabled task type unit test Signed-off-by: Jana Peper --- tests/lib/TaskProcessing/TaskProcessingTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/lib/TaskProcessing/TaskProcessingTest.php b/tests/lib/TaskProcessing/TaskProcessingTest.php index f4bbef73f73ca..a210ff00274f2 100644 --- a/tests/lib/TaskProcessing/TaskProcessingTest.php +++ b/tests/lib/TaskProcessing/TaskProcessingTest.php @@ -449,7 +449,7 @@ protected function setUp(): void { $config->method('getAppValue') ->with('core', 'ai.textprocessing_provider_preferences', '') ->willReturn(''); - $config->method('getAppValue') + $config->method('getAppValue') ->with('core', 'ai.taskprocessing_type_preferences', '') ->willReturn(json_encode($taskProcessingTypeSettings)); @@ -468,7 +468,7 @@ protected function setUp(): void { $this->userMountCache = $this->createMock(IUserMountCache::class); $this->manager = new Manager( - \OC::$server->get(IConfig::class), + $config, $this->coordinator, $this->serverContainer, \OC::$server->get(LoggerInterface::class), @@ -510,7 +510,7 @@ public function testProviderShouldBeRegisteredAndTaskTypeDisabled(): void { $this->config->method('getAppValue') ->with('core', 'ai.taskprocessing_type_preferences', '') ->willReturn(json_encode($taskProcessingTypeSettings));*/ - self::assertCount(0, $this->manager->getAvailableTaskTypes()); + self::assertCount(0, $this->manager->getAvailableTaskTypes()); self::assertCount(1, $this->manager->getAvailableTaskTypes(true)); self::assertFalse($this->manager->hasProviders()); self::expectException(\OCP\TaskProcessing\Exception\PreConditionNotMetException::class);