diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-03-15 13:03:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-15 13:03:34 +0100 |
commit | 9338ef36ded767f2c35b7ec575b351859420ed09 (patch) | |
tree | 65c53c6a36f300859dc22b2d423275bcf2911367 /tests/lib/Migration/BackgroundRepairTest.php | |
parent | 6b09a79227a5dc98aa4620c6e5e15b610a06c806 (diff) | |
parent | df1cd1ba7e6e1f6e66a2b3229b5c082f1b81162e (diff) | |
download | nextcloud-server-9338ef36ded767f2c35b7ec575b351859420ed09.tar.gz nextcloud-server-9338ef36ded767f2c35b7ec575b351859420ed09.zip |
Merge branch 'master' into refactor/OC-Server-getShareManager
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Diffstat (limited to 'tests/lib/Migration/BackgroundRepairTest.php')
-rw-r--r-- | tests/lib/Migration/BackgroundRepairTest.php | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/tests/lib/Migration/BackgroundRepairTest.php b/tests/lib/Migration/BackgroundRepairTest.php index 2e68924a96d..95cd5419f30 100644 --- a/tests/lib/Migration/BackgroundRepairTest.php +++ b/tests/lib/Migration/BackgroundRepairTest.php @@ -21,15 +21,15 @@ namespace Test\Migration; -use OCP\AppFramework\Utility\ITimeFactory; -use OCP\EventDispatcher\IEventDispatcher; -use OCP\Migration\IOutput; -use OCP\Migration\IRepairStep; use OC\BackgroundJob\JobList; use OC\Migration\BackgroundRepair; use OC\NeedsUpdateException; +use OC\Repair; use OC\Repair\Events\RepairStepEvent; -use PHPUnit\Framework\MockObject\MockObject; +use OCP\AppFramework\Utility\ITimeFactory; +use OCP\EventDispatcher\IEventDispatcher; +use OCP\Migration\IOutput; +use OCP\Migration\IRepairStep; use Psr\Log\LoggerInterface; use Test\TestCase; @@ -57,20 +57,12 @@ class TestRepairStep implements IRepairStep { } class BackgroundRepairTest extends TestCase { - /** @var JobList|MockObject */ - private $jobList; - - /** @var BackgroundRepair|MockObject */ - private $job; - - /** @var LoggerInterface|MockObject */ - private $logger; - - /** @var IEventDispatcher|MockObject $dispatcher */ - private $dispatcher; - - /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject $dispatcher */ - private $time; + private JobList $jobList; + private BackgroundRepair $job; + private LoggerInterface $logger; + private IEventDispatcher $dispatcher; + private ITimeFactory $time; + private Repair $repair; protected function setUp(): void { parent::setUp(); @@ -85,8 +77,9 @@ class BackgroundRepairTest extends TestCase { $this->time = $this->createMock(ITimeFactory::class); $this->time->method('getTime') ->willReturn(999999); + $this->repair = new Repair($this->dispatcher, $this->logger); $this->job = $this->getMockBuilder(BackgroundRepair::class) - ->setConstructorArgs([$this->dispatcher, $this->time, $this->logger, $this->jobList]) + ->setConstructorArgs([$this->repair, $this->time, $this->logger, $this->jobList]) ->setMethods(['loadApp']) ->getMock(); } |