diff options
Diffstat (limited to 'apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php')
-rw-r--r-- | apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php b/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php index 6c6e02ce717..e0601c5c71a 100644 --- a/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2017, Georg Ehrke * @@ -27,15 +30,20 @@ namespace OCA\DAV\Tests\unit\BackgroundJob; use OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob; use OCA\DAV\CalDAV\BirthdayService; +use OCP\AppFramework\Utility\ITimeFactory; use OCP\IConfig; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class GenerateBirthdayCalendarBackgroundJobTest extends TestCase { - /** @var BirthdayService | \PHPUnit\Framework\MockObject\MockObject */ + /** @var ITimeFactory|MockObject */ + private $time; + + /** @var BirthdayService | MockObject */ private $birthdayService; - /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */ + /** @var IConfig | MockObject */ private $config; /** @var \OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob */ @@ -44,11 +52,15 @@ class GenerateBirthdayCalendarBackgroundJobTest extends TestCase { protected function setUp(): void { parent::setUp(); + $this->time = $this->createMock(ITimeFactory::class); $this->birthdayService = $this->createMock(BirthdayService::class); $this->config = $this->createMock(IConfig::class); $this->backgroundJob = new GenerateBirthdayCalendarBackgroundJob( - $this->birthdayService, $this->config); + $this->time, + $this->birthdayService, + $this->config, + ); } public function testRun() { |