mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
test: Mock ITaskManager to remove test interactions
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
fa645663a8
commit
89a7778f87
2 changed files with 8 additions and 8 deletions
|
|
@ -157,7 +157,7 @@ class RegistrationContext {
|
|||
|
||||
/** @var ServiceRegistration<\OCP\Files\Conversion\IConversionProvider>[] */
|
||||
private array $fileConversionProviders = [];
|
||||
|
||||
|
||||
/** @var ServiceRegistration<IMailProvider>[] */
|
||||
private $mailProviders = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue