summaryrefslogtreecommitdiffstats
path: root/tests/Core/Command/Maintenance
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-09-01 09:20:54 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-09-01 09:20:54 +0200
commit74fdaab870ba92db0d9ade65a428e9de04ee2e8d (patch)
tree0b148ef953f92e4aee3c4fca844569f39d8bb14a /tests/Core/Command/Maintenance
parent4a5cd74fb29b19c975f893e0289b1b34bf5e8a62 (diff)
downloadnextcloud-server-74fdaab870ba92db0d9ade65a428e9de04ee2e8d.tar.gz
nextcloud-server-74fdaab870ba92db0d9ade65a428e9de04ee2e8d.zip
Fix depreccated getMock in Core/Command tests
Diffstat (limited to 'tests/Core/Command/Maintenance')
-rw-r--r--tests/Core/Command/Maintenance/DataFingerprintTest.php10
-rw-r--r--tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php12
-rw-r--r--tests/Core/Command/Maintenance/SingleUserTest.php9
3 files changed, 20 insertions, 11 deletions
diff --git a/tests/Core/Command/Maintenance/DataFingerprintTest.php b/tests/Core/Command/Maintenance/DataFingerprintTest.php
index 4d661b5c027..90ffa50c012 100644
--- a/tests/Core/Command/Maintenance/DataFingerprintTest.php
+++ b/tests/Core/Command/Maintenance/DataFingerprintTest.php
@@ -24,6 +24,8 @@ namespace Tests\Core\Command\Maintenance;
use OC\Core\Command\Maintenance\DataFingerprint;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IConfig;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
use Test\TestCase;
class DataFingerprintTest extends TestCase {
@@ -42,10 +44,10 @@ class DataFingerprintTest extends TestCase {
protected function setUp() {
parent::setUp();
- $this->config = $this->getMock('OCP\IConfig');
- $this->timeFactory = $this->getMock('OCP\AppFramework\Utility\ITimeFactory');
- $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface');
- $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface');
+ $this->config = $this->getMockBuilder(IConfig::class)->getMock();
+ $this->timeFactory = $this->getMockBuilder(ITimeFactory::class)->getMock();
+ $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock();
+ $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock();
/** @var \OCP\IConfig $config */
$this->command = new DataFingerprint($this->config, $this->timeFactory);
diff --git a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php
index 217301102c5..8c023274da5 100644
--- a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php
+++ b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php
@@ -22,6 +22,10 @@
namespace Tests\Core\Command\Maintenance\Mimetype;
use OC\Core\Command\Maintenance\Mimetype\UpdateDB;
+use OC\Files\Type\Detection;
+use OC\Files\Type\Loader;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
use Test\TestCase;
use OCP\Files\IMimeTypeDetector;
use OCP\Files\IMimeTypeLoader;
@@ -43,15 +47,15 @@ class UpdateDBTest extends TestCase {
protected function setUp() {
parent::setUp();
- $this->detector = $this->getMockBuilder('OC\Files\Type\Detection')
+ $this->detector = $this->getMockBuilder(Detection::class)
->disableOriginalConstructor()
->getMock();
- $this->loader = $this->getMockBuilder('OC\Files\Type\Loader')
+ $this->loader = $this->getMockBuilder(Loader::class)
->disableOriginalConstructor()
->getMock();
- $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface');
- $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface');
+ $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock();
+ $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock();
$this->command = new UpdateDB($this->detector, $this->loader);
}
diff --git a/tests/Core/Command/Maintenance/SingleUserTest.php b/tests/Core/Command/Maintenance/SingleUserTest.php
index 6629f39564f..13efebacb0a 100644
--- a/tests/Core/Command/Maintenance/SingleUserTest.php
+++ b/tests/Core/Command/Maintenance/SingleUserTest.php
@@ -23,6 +23,9 @@ namespace Tests\Core\Command\Maintenance;
use OC\Core\Command\Maintenance\SingleUser;
+use OCP\IConfig;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
use Test\TestCase;
class SingleUserTest extends TestCase {
@@ -39,11 +42,11 @@ class SingleUserTest extends TestCase {
protected function setUp() {
parent::setUp();
- $config = $this->config = $this->getMockBuilder('OCP\IConfig')
+ $config = $this->config = $this->getMockBuilder(IConfig::class)
->disableOriginalConstructor()
->getMock();
- $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface');
- $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface');
+ $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock();
+ $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock();
/** @var \OCP\IConfig $config */
$this->command = new SingleUser($config);