diff options
Diffstat (limited to 'tests/lib/BackgroundJob/TestTimedJobNew.php')
-rw-r--r-- | tests/lib/BackgroundJob/TestTimedJobNew.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/lib/BackgroundJob/TestTimedJobNew.php b/tests/lib/BackgroundJob/TestTimedJobNew.php new file mode 100644 index 00000000000..a40c4033655 --- /dev/null +++ b/tests/lib/BackgroundJob/TestTimedJobNew.php @@ -0,0 +1,26 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +namespace Test\BackgroundJob; + +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\BackgroundJob\TimedJob; + +class TestTimedJobNew extends TimedJob { + public bool $ran = false; + + public function __construct(ITimeFactory $timeFactory) { + parent::__construct($timeFactory); + $this->setInterval(10); + } + + public function run($argument) { + $this->ran = true; + } +} |