diff options
Diffstat (limited to 'apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php')
-rw-r--r-- | apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php b/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php index 2b11223210e..7713ef2945a 100644 --- a/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php @@ -19,20 +19,11 @@ use Psr\Log\LoggerInterface; use Test\TestCase; class RefreshWebcalJobTest extends TestCase { - - /** @var RefreshWebcalService | MockObject */ - private $refreshWebcalService; - - /** @var IConfig | MockObject */ - private $config; - + private RefreshWebcalService&MockObject $refreshWebcalService; + private IConfig&MockObject $config; private LoggerInterface $logger; - - /** @var ITimeFactory | MockObject */ - private $timeFactory; - - /** @var IJobList | MockObject */ - private $jobList; + private ITimeFactory&MockObject $timeFactory; + private IJobList&MockObject $jobList; protected function setUp(): void { parent::setUp(); @@ -50,9 +41,8 @@ class RefreshWebcalJobTest extends TestCase { * @param int $lastRun * @param int $time * @param bool $process - * - * @dataProvider runDataProvider */ + #[\PHPUnit\Framework\Attributes\DataProvider('runDataProvider')] public function testRun(int $lastRun, int $time, bool $process): void { $backgroundJob = new RefreshWebcalJob($this->refreshWebcalService, $this->config, $this->logger, $this->timeFactory); $backgroundJob->setId(42); @@ -97,10 +87,7 @@ class RefreshWebcalJobTest extends TestCase { $backgroundJob->start($this->jobList); } - /** - * @return array - */ - public function runDataProvider():array { + public static function runDataProvider():array { return [ [0, 100000, true], [100000, 100000, false] |