diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-10-24 15:26:53 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-10-24 17:45:32 +0200 |
commit | 43e498844e8c1aa519a19238d2cf3d6b95e1aab0 (patch) | |
tree | 59510ef2ffc6c1fd1fd92475013b108f1da2bfeb /apps/files_external/tests/Auth/AuthMechanismTest.php | |
parent | b1f77aca4effec99387481a831910d4870ae2ffc (diff) | |
download | nextcloud-server-43e498844e8c1aa519a19238d2cf3d6b95e1aab0.tar.gz nextcloud-server-43e498844e8c1aa519a19238d2cf3d6b95e1aab0.zip |
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_external/tests/Auth/AuthMechanismTest.php')
-rw-r--r-- | apps/files_external/tests/Auth/AuthMechanismTest.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/files_external/tests/Auth/AuthMechanismTest.php b/apps/files_external/tests/Auth/AuthMechanismTest.php index 5d635a5036a..11eee7b8824 100644 --- a/apps/files_external/tests/Auth/AuthMechanismTest.php +++ b/apps/files_external/tests/Auth/AuthMechanismTest.php @@ -22,10 +22,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 +56,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 +65,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()) |