diff options
Diffstat (limited to 'tests/lib/Repair/ClearFrontendCachesTest.php')
-rw-r--r-- | tests/lib/Repair/ClearFrontendCachesTest.php | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/lib/Repair/ClearFrontendCachesTest.php b/tests/lib/Repair/ClearFrontendCachesTest.php index 640e272f3b7..3e5927565fe 100644 --- a/tests/lib/Repair/ClearFrontendCachesTest.php +++ b/tests/lib/Repair/ClearFrontendCachesTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -6,23 +7,20 @@ namespace Test\Repair; +use OC\Repair\ClearFrontendCaches; use OC\Template\JSCombiner; use OCP\ICache; use OCP\ICacheFactory; use OCP\Migration\IOutput; +use PHPUnit\Framework\MockObject\MockObject; class ClearFrontendCachesTest extends \Test\TestCase { - /** @var ICacheFactory */ - private $cacheFactory; - - /** @var JSCombiner */ - private $jsCombiner; - /** @var \OC\Repair\ClearFrontendCaches */ - protected $repair; + private ICacheFactory&MockObject $cacheFactory; + private JSCombiner&MockObject $jsCombiner; + private IOutput&MockObject $outputMock; - /** @var IOutput */ - private $outputMock; + protected ClearFrontendCaches $repair; protected function setUp(): void { parent::setUp(); @@ -32,11 +30,11 @@ class ClearFrontendCachesTest extends \Test\TestCase { $this->cacheFactory = $this->createMock(ICacheFactory::class); $this->jsCombiner = $this->createMock(JSCombiner::class); - $this->repair = new \OC\Repair\ClearFrontendCaches($this->cacheFactory, $this->jsCombiner); + $this->repair = new ClearFrontendCaches($this->cacheFactory, $this->jsCombiner); } - public function testRun() { + public function testRun(): void { $imagePathCache = $this->createMock(ICache::class); $imagePathCache->expects($this->once()) ->method('clear') |