aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/UpdaterTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/UpdaterTest.php')
-rw-r--r--tests/lib/UpdaterTest.php25
1 files changed, 10 insertions, 15 deletions
diff --git a/tests/lib/UpdaterTest.php b/tests/lib/UpdaterTest.php
index da48e581fbc..81babee7029 100644
--- a/tests/lib/UpdaterTest.php
+++ b/tests/lib/UpdaterTest.php
@@ -12,10 +12,13 @@ use OC\IntegrityCheck\Checker;
use OC\Updater;
use OCP\IAppConfig;
use OCP\IConfig;
+use OCP\ServerVersion;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
class UpdaterTest extends TestCase {
+ /** @var ServerVersion|MockObject */
+ private $serverVersion;
/** @var IConfig|MockObject */
private $config;
/** @var IAppConfig|MockObject */
@@ -31,23 +34,15 @@ class UpdaterTest extends TestCase {
protected function setUp(): void {
parent::setUp();
- $this->config = $this->getMockBuilder(IConfig::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->appConfig = $this->getMockBuilder(IAppConfig::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->logger = $this->getMockBuilder(LoggerInterface::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->checker = $this->getMockBuilder(Checker::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->installer = $this->getMockBuilder(Installer::class)
- ->disableOriginalConstructor()
- ->getMock();
+ $this->serverVersion = $this->createMock(ServerVersion::class);
+ $this->config = $this->createMock(IConfig::class);
+ $this->appConfig = $this->createMock(IAppConfig::class);
+ $this->logger = $this->createMock(LoggerInterface::class);
+ $this->checker = $this->createMock(Checker::class);
+ $this->installer = $this->createMock(Installer::class);
$this->updater = new Updater(
+ $this->serverVersion,
$this->config,
$this->appConfig,
$this->checker,