diff options
author | Joas Schilling <coding@schilljs.com> | 2025-05-29 11:51:28 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2025-05-29 12:20:20 +0200 |
commit | 89a7778f87c7eda848d026cc575fa4f6c8d1ceb5 (patch) | |
tree | 3df633382e1462b767c9c3ff684c82808e1ecd96 /tests | |
parent | fa645663a891eb121fe275a203b881e0f12df4ba (diff) | |
download | nextcloud-server-89a7778f87c7eda848d026cc575fa4f6c8d1ceb5.tar.gz nextcloud-server-89a7778f87c7eda848d026cc575fa4f6c8d1ceb5.zip |
test: Mock ITaskManager to remove test interactions
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/TextProcessing/TextProcessingTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/lib/TextProcessing/TextProcessingTest.php b/tests/lib/TextProcessing/TextProcessingTest.php index 84c5492a4a2..1bbb9cf527e 100644 --- a/tests/lib/TextProcessing/TextProcessingTest.php +++ b/tests/lib/TextProcessing/TextProcessingTest.php @@ -118,7 +118,7 @@ class TextProcessingTest extends \Test\TestCase { $this->eventDispatcher = new EventDispatcher( new \Symfony\Component\EventDispatcher\EventDispatcher(), $this->serverContainer, - \OC::$server->get(LoggerInterface::class), + \OCP\Server::get(LoggerInterface::class), ); $this->registrationContext = $this->createMock(RegistrationContext::class); @@ -176,11 +176,11 @@ class TextProcessingTest extends \Test\TestCase { $this->manager = new Manager( $this->serverContainer, $this->coordinator, - \OC::$server->get(LoggerInterface::class), + \OCP\Server::get(LoggerInterface::class), $this->jobList, $this->taskMapper, $config, - \OC::$server->get(\OCP\TaskProcessing\IManager::class), + $this->createMock(\OCP\TaskProcessing\IManager::class), ); } @@ -239,7 +239,7 @@ class TextProcessingTest extends \Test\TestCase { // run background job $bgJob = new TaskBackgroundJob( - \OC::$server->get(ITimeFactory::class), + \OCP\Server::get(ITimeFactory::class), $this->manager, $this->eventDispatcher, ); @@ -314,7 +314,7 @@ class TextProcessingTest extends \Test\TestCase { // run background job $bgJob = new TaskBackgroundJob( - \OC::$server->get(ITimeFactory::class), + \OCP\Server::get(ITimeFactory::class), $this->manager, $this->eventDispatcher, ); @@ -343,9 +343,9 @@ class TextProcessingTest extends \Test\TestCase { $this->currentTime = $this->currentTime->add(new \DateInterval('P1Y')); // run background job $bgJob = new RemoveOldTasksBackgroundJob( - \OC::$server->get(ITimeFactory::class), + \OCP\Server::get(ITimeFactory::class), $this->taskMapper, - \OC::$server->get(LoggerInterface::class), + \OCP\Server::get(LoggerInterface::class), ); $bgJob->setArgument([]); $bgJob->start($this->jobList); |