mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix: Fix Task mock error: use real Task instances; run autoloaderchecker
Co-authored-by: marcelklehr <986878+marcelklehr@users.noreply.github.com>
This commit is contained in:
parent
fb8ac6863c
commit
e1208cad4c
3 changed files with 6 additions and 4 deletions
|
|
@ -1368,6 +1368,7 @@ return array(
|
|||
'OC\\Core\\Command\\TaskProcessing\\GetCommand' => $baseDir . '/core/Command/TaskProcessing/GetCommand.php',
|
||||
'OC\\Core\\Command\\TaskProcessing\\ListCommand' => $baseDir . '/core/Command/TaskProcessing/ListCommand.php',
|
||||
'OC\\Core\\Command\\TaskProcessing\\Statistics' => $baseDir . '/core/Command/TaskProcessing/Statistics.php',
|
||||
'OC\\Core\\Command\\TaskProcessing\\WorkerCommand' => $baseDir . '/core/Command/TaskProcessing/WorkerCommand.php',
|
||||
'OC\\Core\\Command\\TwoFactorAuth\\Base' => $baseDir . '/core/Command/TwoFactorAuth/Base.php',
|
||||
'OC\\Core\\Command\\TwoFactorAuth\\Cleanup' => $baseDir . '/core/Command/TwoFactorAuth/Cleanup.php',
|
||||
'OC\\Core\\Command\\TwoFactorAuth\\Disable' => $baseDir . '/core/Command/TwoFactorAuth/Disable.php',
|
||||
|
|
|
|||
|
|
@ -1409,6 +1409,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
|
|||
'OC\\Core\\Command\\TaskProcessing\\GetCommand' => __DIR__ . '/../../..' . '/core/Command/TaskProcessing/GetCommand.php',
|
||||
'OC\\Core\\Command\\TaskProcessing\\ListCommand' => __DIR__ . '/../../..' . '/core/Command/TaskProcessing/ListCommand.php',
|
||||
'OC\\Core\\Command\\TaskProcessing\\Statistics' => __DIR__ . '/../../..' . '/core/Command/TaskProcessing/Statistics.php',
|
||||
'OC\\Core\\Command\\TaskProcessing\\WorkerCommand' => __DIR__ . '/../../..' . '/core/Command/TaskProcessing/WorkerCommand.php',
|
||||
'OC\\Core\\Command\\TwoFactorAuth\\Base' => __DIR__ . '/../../..' . '/core/Command/TwoFactorAuth/Base.php',
|
||||
'OC\\Core\\Command\\TwoFactorAuth\\Cleanup' => __DIR__ . '/../../..' . '/core/Command/TwoFactorAuth/Cleanup.php',
|
||||
'OC\\Core\\Command\\TwoFactorAuth\\Disable' => __DIR__ . '/../../..' . '/core/Command/TwoFactorAuth/Disable.php',
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@ class WorkerCommandTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Helper to create a Task mock with an id.
|
||||
* Helper to create a real Task with a given id.
|
||||
*/
|
||||
private function createTask(int $id): Task&MockObject {
|
||||
$task = $this->createMock(Task::class);
|
||||
$task->method('getId')->willReturn($id);
|
||||
private function createTask(int $id): Task {
|
||||
$task = new Task('test_task_type', [], 'testapp', null);
|
||||
$task->setId($id);
|
||||
return $task;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue