summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/Auth/AuthMechanismTest.php13
-rw-r--r--apps/files_external/tests/Auth/Password/GlobalAuth.php1
-rw-r--r--apps/files_external/tests/Backend/BackendTest.php8
-rw-r--r--apps/files_external/tests/Command/ApplicableTest.php1
-rw-r--r--apps/files_external/tests/Command/ListCommandTest.php3
-rw-r--r--apps/files_external/tests/Controller/AjaxControllerTest.php1
-rw-r--r--apps/files_external/tests/Controller/GlobalStoragesControllerTest.php1
-rw-r--r--apps/files_external/tests/Controller/StoragesControllerTest.php7
-rw-r--r--apps/files_external/tests/Controller/UserStoragesControllerTest.php1
-rw-r--r--apps/files_external/tests/FrontendDefinitionTraitTest.php14
-rw-r--r--apps/files_external/tests/Service/BackendServiceTest.php12
-rw-r--r--apps/files_external/tests/Service/StoragesServiceTest.php10
-rw-r--r--apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php1
-rw-r--r--apps/files_external/tests/Service/UserStoragesServiceTest.php1
-rw-r--r--apps/files_external/tests/Settings/SectionTest.php5
-rw-r--r--apps/files_external/tests/Storage/SmbTest.php1
-rw-r--r--apps/files_external/tests/StorageConfigTest.php10
17 files changed, 64 insertions, 26 deletions
diff --git a/apps/files_external/tests/Auth/AuthMechanismTest.php b/apps/files_external/tests/Auth/AuthMechanismTest.php
index 5d635a5036a..ed3b52c1dbb 100644
--- a/apps/files_external/tests/Auth/AuthMechanismTest.php
+++ b/apps/files_external/tests/Auth/AuthMechanismTest.php
@@ -2,6 +2,7 @@
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
+ * @author Morris Jobke <hey@morrisjobke.de>
* @author Robin McCorkell <robin@mccorkell.me.uk>
*
* @license AGPL-3.0
@@ -22,10 +23,14 @@
namespace OCA\Files_External\Tests\Auth;
+use OCA\Files_External\Lib\Auth\AuthMechanism;
+use OCA\Files_External\Lib\Backend\Backend;
+use OCA\Files_External\Lib\StorageConfig;
+
class AuthMechanismTest extends \Test\TestCase {
public function testJsonSerialization() {
- $mechanism = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\AuthMechanism')
+ $mechanism = $this->getMockBuilder(AuthMechanism::class)
->setMethods(['jsonSerializeDefinition'])
->getMock();
$mechanism->expects($this->once())
@@ -52,7 +57,7 @@ class AuthMechanismTest extends \Test\TestCase {
* @dataProvider validateStorageProvider
*/
public function testValidateStorage($expectedSuccess, $scheme, $definitionSuccess) {
- $mechanism = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\AuthMechanism')
+ $mechanism = $this->getMockBuilder(AuthMechanism::class)
->setMethods(['validateStorageDefinition'])
->getMock();
$mechanism->expects($this->atMost(1))
@@ -61,14 +66,14 @@ class AuthMechanismTest extends \Test\TestCase {
$mechanism->setScheme($scheme);
- $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend')
+ $backend = $this->getMockBuilder(Backend::class)
->disableOriginalConstructor()
->getMock();
$backend->expects($this->once())
->method('getAuthSchemes')
->willReturn(['scheme' => true, 'foobar' => true]);
- $storageConfig = $this->getMockBuilder('\OCA\Files_External\Lib\StorageConfig')
+ $storageConfig = $this->getMockBuilder(StorageConfig::class)
->disableOriginalConstructor()
->getMock();
$storageConfig->expects($this->once())
diff --git a/apps/files_external/tests/Auth/Password/GlobalAuth.php b/apps/files_external/tests/Auth/Password/GlobalAuth.php
index 405fbd2941c..c447be7a669 100644
--- a/apps/files_external/tests/Auth/Password/GlobalAuth.php
+++ b/apps/files_external/tests/Auth/Password/GlobalAuth.php
@@ -3,6 +3,7 @@
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Robin Appelman <robin@icewind.nl>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license AGPL-3.0
*
diff --git a/apps/files_external/tests/Backend/BackendTest.php b/apps/files_external/tests/Backend/BackendTest.php
index 762b9f4c0e8..bc8aa6a0aee 100644
--- a/apps/files_external/tests/Backend/BackendTest.php
+++ b/apps/files_external/tests/Backend/BackendTest.php
@@ -2,6 +2,7 @@
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
+ * @author Morris Jobke <hey@morrisjobke.de>
* @author Robin McCorkell <robin@mccorkell.me.uk>
*
* @license AGPL-3.0
@@ -23,11 +24,12 @@
namespace OCA\Files_External\Tests\Backend;
use \OCA\Files_External\Lib\Backend\Backend;
+use OCA\Files_External\Lib\StorageConfig;
class BackendTest extends \Test\TestCase {
public function testJsonSerialization() {
- $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend')
+ $backend = $this->getMockBuilder(Backend::class)
->setMethods(['jsonSerializeDefinition'])
->getMock();
$backend->expects($this->once())
@@ -59,14 +61,14 @@ class BackendTest extends \Test\TestCase {
* @dataProvider validateStorageProvider
*/
public function testValidateStorage($expectedSuccess, $definitionSuccess) {
- $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend')
+ $backend = $this->getMockBuilder(Backend::class)
->setMethods(['validateStorageDefinition'])
->getMock();
$backend->expects($this->atMost(1))
->method('validateStorageDefinition')
->willReturn($definitionSuccess);
- $storageConfig = $this->getMockBuilder('\OCA\Files_External\Lib\StorageConfig')
+ $storageConfig = $this->getMockBuilder(StorageConfig::class)
->disableOriginalConstructor()
->getMock();
diff --git a/apps/files_external/tests/Command/ApplicableTest.php b/apps/files_external/tests/Command/ApplicableTest.php
index 70b18be6b7b..90cfeace361 100644
--- a/apps/files_external/tests/Command/ApplicableTest.php
+++ b/apps/files_external/tests/Command/ApplicableTest.php
@@ -3,6 +3,7 @@
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Robin Appelman <robin@icewind.nl>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license AGPL-3.0
*
diff --git a/apps/files_external/tests/Command/ListCommandTest.php b/apps/files_external/tests/Command/ListCommandTest.php
index 76a8f98f520..046b4de3282 100644
--- a/apps/files_external/tests/Command/ListCommandTest.php
+++ b/apps/files_external/tests/Command/ListCommandTest.php
@@ -2,8 +2,11 @@
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
+ * @author Christoph Wurst <christoph@owncloud.com>
* @author Joas Schilling <coding@schilljs.com>
+ * @author Lukas Reschke <lukas@statuscode.ch>
* @author Robin Appelman <robin@icewind.nl>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license AGPL-3.0
*
diff --git a/apps/files_external/tests/Controller/AjaxControllerTest.php b/apps/files_external/tests/Controller/AjaxControllerTest.php
index 8aba70e0d6b..1153036c414 100644
--- a/apps/files_external/tests/Controller/AjaxControllerTest.php
+++ b/apps/files_external/tests/Controller/AjaxControllerTest.php
@@ -3,6 +3,7 @@
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*
* @author Lukas Reschke <lukas@statuscode.ch>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
*
diff --git a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php
index 5c334efdf4c..2e0245e76fa 100644
--- a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php
+++ b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php
@@ -5,6 +5,7 @@
* @author Joas Schilling <coding@schilljs.com>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Vincent Petry <pvince81@owncloud.com>
*
* @license AGPL-3.0
diff --git a/apps/files_external/tests/Controller/StoragesControllerTest.php b/apps/files_external/tests/Controller/StoragesControllerTest.php
index 35a055e6be5..ad0a3401412 100644
--- a/apps/files_external/tests/Controller/StoragesControllerTest.php
+++ b/apps/files_external/tests/Controller/StoragesControllerTest.php
@@ -3,6 +3,7 @@
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
+ * @author Morris Jobke <hey@morrisjobke.de>
* @author Robin McCorkell <robin@mccorkell.me.uk>
* @author Vincent Petry <pvince81@owncloud.com>
*
@@ -23,6 +24,8 @@
*/
namespace OCA\Files_External\Tests\Controller;
+use OCA\Files_External\Lib\Auth\AuthMechanism;
+use OCA\Files_External\Lib\Backend\Backend;
use \OCP\AppFramework\Http;
use \OCA\Files_External\Controller\GlobalStoragesController;
@@ -54,7 +57,7 @@ abstract class StoragesControllerTest extends \Test\TestCase {
* @return \OCA\Files_External\Lib\Backend\Backend
*/
protected function getBackendMock($class = '\OCA\Files_External\Lib\Backend\SMB', $storageClass = '\OCA\Files_External\Lib\Storage\SMB') {
- $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend')
+ $backend = $this->getMockBuilder(Backend::class)
->disableOriginalConstructor()
->getMock();
$backend->method('getStorageClass')
@@ -68,7 +71,7 @@ abstract class StoragesControllerTest extends \Test\TestCase {
* @return \OCA\Files_External\Lib\Auth\AuthMechanism
*/
protected function getAuthMechMock($scheme = 'null', $class = '\OCA\Files_External\Lib\Auth\NullMechanism') {
- $authMech = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\AuthMechanism')
+ $authMech = $this->getMockBuilder(AuthMechanism::class)
->disableOriginalConstructor()
->getMock();
$authMech->method('getScheme')
diff --git a/apps/files_external/tests/Controller/UserStoragesControllerTest.php b/apps/files_external/tests/Controller/UserStoragesControllerTest.php
index cdfcbcd1407..817c5b4e5c3 100644
--- a/apps/files_external/tests/Controller/UserStoragesControllerTest.php
+++ b/apps/files_external/tests/Controller/UserStoragesControllerTest.php
@@ -5,6 +5,7 @@
* @author Joas Schilling <coding@schilljs.com>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Vincent Petry <pvince81@owncloud.com>
*
* @license AGPL-3.0
diff --git a/apps/files_external/tests/FrontendDefinitionTraitTest.php b/apps/files_external/tests/FrontendDefinitionTraitTest.php
index 7efc7c66586..cdb1cb2b879 100644
--- a/apps/files_external/tests/FrontendDefinitionTraitTest.php
+++ b/apps/files_external/tests/FrontendDefinitionTraitTest.php
@@ -2,6 +2,7 @@
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
+ * @author Morris Jobke <hey@morrisjobke.de>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
*
@@ -23,10 +24,13 @@
namespace OCA\Files_External\Tests;
+use OCA\Files_External\Lib\DefinitionParameter;
+use OCA\Files_External\Lib\StorageConfig;
+
class FrontendDefinitionTraitTest extends \Test\TestCase {
public function testJsonSerialization() {
- $param = $this->getMockBuilder('\OCA\Files_External\Lib\DefinitionParameter')
+ $param = $this->getMockBuilder(DefinitionParameter::class)
->disableOriginalConstructor()
->getMock();
$param->method('getName')->willReturn('foo');
@@ -60,7 +64,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase {
public function testValidateStorage($expectedSuccess, $params) {
$backendParams = [];
foreach ($params as $name => $valid) {
- $param = $this->getMockBuilder('\OCA\Files_External\Lib\DefinitionParameter')
+ $param = $this->getMockBuilder(DefinitionParameter::class)
->disableOriginalConstructor()
->getMock();
$param->method('getName')
@@ -73,7 +77,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase {
$backendParams[] = $param;
}
- $storageConfig = $this->getMockBuilder('\OCA\Files_External\Lib\StorageConfig')
+ $storageConfig = $this->getMockBuilder(StorageConfig::class)
->disableOriginalConstructor()
->getMock();
$storageConfig->expects($this->any())
@@ -90,7 +94,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase {
}
public function testValidateStorageSet() {
- $param = $this->getMockBuilder('\OCA\Files_External\Lib\DefinitionParameter')
+ $param = $this->getMockBuilder(DefinitionParameter::class)
->disableOriginalConstructor()
->getMock();
$param->method('getName')
@@ -102,7 +106,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase {
return true;
}));
- $storageConfig = $this->getMockBuilder('\OCA\Files_External\Lib\StorageConfig')
+ $storageConfig = $this->getMockBuilder(StorageConfig::class)
->disableOriginalConstructor()
->getMock();
$storageConfig->expects($this->once())
diff --git a/apps/files_external/tests/Service/BackendServiceTest.php b/apps/files_external/tests/Service/BackendServiceTest.php
index cbb25579e11..e8a3181658c 100644
--- a/apps/files_external/tests/Service/BackendServiceTest.php
+++ b/apps/files_external/tests/Service/BackendServiceTest.php
@@ -2,7 +2,9 @@
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
+ * @author Morris Jobke <hey@morrisjobke.de>
* @author Robin McCorkell <robin@mccorkell.me.uk>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license AGPL-3.0
*
@@ -21,6 +23,8 @@
*/
namespace OCA\Files_External\Tests\Service;
+use OCA\Files_External\Lib\Auth\AuthMechanism;
+use OCA\Files_External\Lib\Backend\Backend;
use OCA\Files_External\Lib\Config\IAuthMechanismProvider;
use OCA\Files_External\Lib\Config\IBackendProvider;
use \OCA\Files_External\Service\BackendService;
@@ -46,7 +50,7 @@ class BackendServiceTest extends \Test\TestCase {
* @return \OCA\Files_External\Lib\Backend\Backend
*/
protected function getBackendMock($class) {
- $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend')
+ $backend = $this->getMockBuilder(Backend::class)
->disableOriginalConstructor()
->getMock();
$backend->method('getIdentifier')->will($this->returnValue('identifier:'.$class));
@@ -60,7 +64,7 @@ class BackendServiceTest extends \Test\TestCase {
* @return \OCA\Files_External\Lib\Auth\AuthMechanism
*/
protected function getAuthMechanismMock($class) {
- $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\AuthMechanism')
+ $backend = $this->getMockBuilder(AuthMechanism::class)
->disableOriginalConstructor()
->getMock();
$backend->method('getIdentifier')->will($this->returnValue('identifier:'.$class));
@@ -73,7 +77,7 @@ class BackendServiceTest extends \Test\TestCase {
$backend = $this->getBackendMock('\Foo\Bar');
- $backendAlias = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend')
+ $backendAlias = $this->getMockBuilder(Backend::class)
->disableOriginalConstructor()
->getMock();
$backendAlias->method('getIdentifierAliases')
@@ -175,7 +179,7 @@ class BackendServiceTest extends \Test\TestCase {
->method('removeVisibility')
->with(BackendService::VISIBILITY_PERSONAL);
- $backendAlias = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend')
+ $backendAlias = $this->getMockBuilder(Backend::class)
->disableOriginalConstructor()
->getMock();
$backendAlias->method('getIdentifierAliases')
diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTest.php
index 056a03d24c8..01e5c4122f2 100644
--- a/apps/files_external/tests/Service/StoragesServiceTest.php
+++ b/apps/files_external/tests/Service/StoragesServiceTest.php
@@ -3,8 +3,10 @@
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
+ * @author Morris Jobke <hey@morrisjobke.de>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Vincent Petry <pvince81@owncloud.com>
*
* @license AGPL-3.0
@@ -27,7 +29,9 @@ namespace OCA\Files_External\Tests\Service;
use \OC\Files\Filesystem;
+use OCA\Files_External\Lib\Auth\AuthMechanism;
use OCA\Files_External\Lib\Auth\InvalidAuth;
+use OCA\Files_External\Lib\Backend\Backend;
use OCA\Files_External\Lib\Backend\InvalidBackend;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
@@ -179,7 +183,7 @@ abstract class StoragesServiceTest extends \Test\TestCase {
}
protected function getBackendMock($class = '\OCA\Files_External\Lib\Backend\SMB', $storageClass = '\OCA\Files_External\Lib\Storage\SMB') {
- $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend')
+ $backend = $this->getMockBuilder(Backend::class)
->disableOriginalConstructor()
->getMock();
$backend->method('getStorageClass')
@@ -190,7 +194,7 @@ abstract class StoragesServiceTest extends \Test\TestCase {
}
protected function getAuthMechMock($scheme = 'null', $class = '\OCA\Files_External\Lib\Auth\NullMechanism') {
- $authMech = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\AuthMechanism')
+ $authMech = $this->getMockBuilder(AuthMechanism::class)
->disableOriginalConstructor()
->getMock();
$authMech->method('getScheme')
@@ -204,7 +208,7 @@ abstract class StoragesServiceTest extends \Test\TestCase {
/**
* Creates a StorageConfig instance based on array data
*
- * @param array data
+ * @param array $data
*
* @return StorageConfig storage config instance
*/
diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php
index 72e5dc15147..013af9b0426 100644
--- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php
+++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php
@@ -5,6 +5,7 @@
* @author Joas Schilling <coding@schilljs.com>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Vincent Petry <pvince81@owncloud.com>
*
* @license AGPL-3.0
diff --git a/apps/files_external/tests/Service/UserStoragesServiceTest.php b/apps/files_external/tests/Service/UserStoragesServiceTest.php
index 3a820f644b4..2d90ec3a488 100644
--- a/apps/files_external/tests/Service/UserStoragesServiceTest.php
+++ b/apps/files_external/tests/Service/UserStoragesServiceTest.php
@@ -5,6 +5,7 @@
* @author Joas Schilling <coding@schilljs.com>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Vincent Petry <pvince81@owncloud.com>
*
* @license AGPL-3.0
diff --git a/apps/files_external/tests/Settings/SectionTest.php b/apps/files_external/tests/Settings/SectionTest.php
index ee501b1270b..b83f8f0feef 100644
--- a/apps/files_external/tests/Settings/SectionTest.php
+++ b/apps/files_external/tests/Settings/SectionTest.php
@@ -3,6 +3,7 @@
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*
* @author Lukas Reschke <lukas@statuscode.ch>
+ * @author Morris Jobke <hey@morrisjobke.de>
*
* @license GNU AGPL version 3 or any later version
*
@@ -38,8 +39,8 @@ class SectionTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->urlGenerator = $this->getMockBuilder('\OCP\IURLGenerator')->disableOriginalConstructor()->getMock();
- $this->l = $this->getMockBuilder('\OCP\IL10N')->disableOriginalConstructor()->getMock();
+ $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->disableOriginalConstructor()->getMock();
+ $this->l = $this->getMockBuilder(IL10N::class)->disableOriginalConstructor()->getMock();
$this->section = new Section(
$this->urlGenerator,
diff --git a/apps/files_external/tests/Storage/SmbTest.php b/apps/files_external/tests/Storage/SmbTest.php
index 037c4cd4d39..edacb498d5e 100644
--- a/apps/files_external/tests/Storage/SmbTest.php
+++ b/apps/files_external/tests/Storage/SmbTest.php
@@ -3,6 +3,7 @@
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
+ * @author Juan Pablo Villafáñez <jvillafanez@solidgear.es>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Robin Appelman <robin@icewind.nl>
* @author Robin McCorkell <robin@mccorkell.me.uk>
diff --git a/apps/files_external/tests/StorageConfigTest.php b/apps/files_external/tests/StorageConfigTest.php
index 96d4fda5050..37bb27bf510 100644
--- a/apps/files_external/tests/StorageConfigTest.php
+++ b/apps/files_external/tests/StorageConfigTest.php
@@ -4,6 +4,7 @@
*
* @author Joas Schilling <coding@schilljs.com>
* @author Lukas Reschke <lukas@statuscode.ch>
+ * @author Morris Jobke <hey@morrisjobke.de>
* @author Robin McCorkell <robin@mccorkell.me.uk>
* @author Vincent Petry <pvince81@owncloud.com>
*
@@ -25,15 +26,18 @@
namespace OCA\Files_External\Tests;
+use OCA\Files_External\Lib\Auth\AuthMechanism;
+use OCA\Files_External\Lib\Backend\Backend;
+use OCA\Files_External\Lib\DefinitionParameter;
use OCA\Files_External\Lib\StorageConfig;
class StorageConfigTest extends \Test\TestCase {
public function testJsonSerialization() {
- $backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend')
+ $backend = $this->getMockBuilder(Backend::class)
->disableOriginalConstructor()
->getMock();
- $parameter = $this->getMockBuilder('\OCA\Files_External\Lib\DefinitionParameter')
+ $parameter = $this->getMockBuilder(DefinitionParameter::class)
->disableOriginalConstructor()
->getMock();
$parameter
@@ -47,7 +51,7 @@ class StorageConfigTest extends \Test\TestCase {
$backend->method('getIdentifier')
->willReturn('storage::identifier');
- $authMech = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\AuthMechanism')
+ $authMech = $this->getMockBuilder(AuthMechanism::class)
->disableOriginalConstructor()
->getMock();
$authMech->method('getIdentifier')