diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-11 22:32:18 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-12 14:55:19 +0300 |
commit | 234b510652d117bb3ef9ef3b6315db3a2c2eb91b (patch) | |
tree | 880cec2bf4fe4846eff9fa5aa68d2671fb0495be /apps/files_external/tests | |
parent | 138f47a1b980aaceb116b256b8ccf14f523e7e67 (diff) |
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_external/tests')
10 files changed, 35 insertions, 36 deletions
diff --git a/apps/files_external/tests/Auth/Password/GlobalAuth.php b/apps/files_external/tests/Auth/Password/GlobalAuth.php index 8edf7358ed8..2abeef4936e 100644 --- a/apps/files_external/tests/Auth/Password/GlobalAuth.php +++ b/apps/files_external/tests/Auth/Password/GlobalAuth.php @@ -32,12 +32,12 @@ use Test\TestCase; class GlobalAuthTest extends TestCase { /** - * @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject + * @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; /** - * @var \OCP\Security\ICredentialsManager|\PHPUnit_Framework_MockObject_MockObject + * @var \OCP\Security\ICredentialsManager|\PHPUnit\Framework\MockObject\MockObject */ private $credentialsManager; @@ -54,7 +54,7 @@ class GlobalAuthTest extends TestCase { } private function getStorageConfig($type, $config = []) { - /** @var \OCA\Files_External\Lib\StorageConfig|\PHPUnit_Framework_MockObject_MockObject $storageConfig */ + /** @var \OCA\Files_External\Lib\StorageConfig|\PHPUnit\Framework\MockObject\MockObject $storageConfig */ $storageConfig = $this->createMock(StorageConfig::class); $storageConfig->expects($this->any()) ->method('getType') @@ -106,7 +106,7 @@ class GlobalAuthTest extends TestCase { ], $storage->getBackendOptions()); } - + public function testNoCredentialsPersonal() { $this->expectException(\OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException::class); diff --git a/apps/files_external/tests/Command/ApplicableTest.php b/apps/files_external/tests/Command/ApplicableTest.php index 668be67dc8b..1479d53244e 100644 --- a/apps/files_external/tests/Command/ApplicableTest.php +++ b/apps/files_external/tests/Command/ApplicableTest.php @@ -30,9 +30,9 @@ use OCP\IUserManager; class ApplicableTest extends CommandTest { private function getInstance($storageService) { - /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject $userManager */ + /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject $userManager */ $userManager = $this->createMock(IUserManager::class); - /** @var \OCP\IGroupManager|\PHPUnit_Framework_MockObject_MockObject $groupManager */ + /** @var \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject $groupManager */ $groupManager = $this->createMock(IGroupManager::class); $userManager->expects($this->any()) diff --git a/apps/files_external/tests/Command/CommandTest.php b/apps/files_external/tests/Command/CommandTest.php index 27ceb67beba..4f0c2501ef0 100644 --- a/apps/files_external/tests/Command/CommandTest.php +++ b/apps/files_external/tests/Command/CommandTest.php @@ -35,7 +35,7 @@ use Test\TestCase; abstract class CommandTest extends TestCase { /** * @param StorageConfig[] $mounts - * @return \OCA\Files_External\Service\GlobalStoragesService|\PHPUnit_Framework_MockObject_MockObject + * @return \OCA\Files_External\Service\GlobalStoragesService|\PHPUnit\Framework\MockObject\MockObject */ protected function getGlobalStorageService(array $mounts = []) { $mock = $this->getMockBuilder('OCA\Files_External\Service\GlobalStoragesService') @@ -48,10 +48,10 @@ abstract class CommandTest extends TestCase { } /** - * @param \PHPUnit_Framework_MockObject_MockObject $mock + * @param \PHPUnit\Framework\MockObject\MockObject $mock * @param StorageConfig[] $mounts */ - protected function bindMounts(\PHPUnit_Framework_MockObject_MockObject $mock, array $mounts) { + protected function bindMounts(\PHPUnit\Framework\MockObject\MockObject $mock, array $mounts) { $mock->expects($this->any()) ->method('getStorage') ->willReturnCallback(function ($id) use ($mounts) { diff --git a/apps/files_external/tests/Command/ListCommandTest.php b/apps/files_external/tests/Command/ListCommandTest.php index 15631301648..c46470021d4 100644 --- a/apps/files_external/tests/Command/ListCommandTest.php +++ b/apps/files_external/tests/Command/ListCommandTest.php @@ -40,21 +40,20 @@ use OCP\ISession; use OCP\IUserManager; use OCP\IUserSession; use OCP\Security\ICrypto; -use PHPUnit_Framework_MockObject_MockObject; use Symfony\Component\Console\Output\BufferedOutput; class ListCommandTest extends CommandTest { /** - * @return ListCommand|PHPUnit_Framework_MockObject_MockObject + * @return ListCommand|\PHPUnit\Framework\MockObject\MockObject */ private function getInstance() { - /** @var GlobalStoragesService|PHPUnit_Framework_MockObject_MockObject $globalService */ + /** @var GlobalStoragesService|\PHPUnit\Framework\MockObject\MockObject $globalService */ $globalService = $this->createMock(GlobalStoragesService::class); - /** @var UserStoragesService|PHPUnit_Framework_MockObject_MockObject $userService */ + /** @var UserStoragesService|\PHPUnit\Framework\MockObject\MockObject $userService */ $userService = $this->createMock(UserStoragesService::class); - /** @var IUserManager|PHPUnit_Framework_MockObject_MockObject $userManager */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject $userManager */ $userManager = $this->createMock(IUserManager::class); - /** @var IUserSession|PHPUnit_Framework_MockObject_MockObject $userSession */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject $userSession */ $userSession = $this->createMock(IUserSession::class); return new ListCommand($globalService, $userService, $userSession, $userManager); diff --git a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php index 5fc03cad9e4..0c8e990125a 100644 --- a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php +++ b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php @@ -34,19 +34,19 @@ use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager; class UserPlaceholderHandlerTest extends \Test\TestCase { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */ protected $user; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ protected $session; - /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ private $shareManager; - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; /** @var UserPlaceholderHandler */ diff --git a/apps/files_external/tests/Service/BackendServiceTest.php b/apps/files_external/tests/Service/BackendServiceTest.php index 0964f48572b..6d120cc9e16 100644 --- a/apps/files_external/tests/Service/BackendServiceTest.php +++ b/apps/files_external/tests/Service/BackendServiceTest.php @@ -36,7 +36,7 @@ use OCP\IConfig; class BackendServiceTest extends \Test\TestCase { - /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; protected function setUp(): void { @@ -46,7 +46,7 @@ class BackendServiceTest extends \Test\TestCase { /** * @param string $class * - * @return \OCA\Files_External\Lib\Backend\Backend|\PHPUnit_Framework_MockObject_MockObject + * @return \OCA\Files_External\Lib\Backend\Backend|\PHPUnit\Framework\MockObject\MockObject */ protected function getBackendMock($class) { $backend = $this->getMockBuilder(Backend::class) @@ -60,7 +60,7 @@ class BackendServiceTest extends \Test\TestCase { /** * @param string $class * - * @return \OCA\Files_External\Lib\Auth\AuthMechanism|\PHPUnit_Framework_MockObject_MockObject + * @return \OCA\Files_External\Lib\Auth\AuthMechanism|\PHPUnit\Framework\MockObject\MockObject */ protected function getAuthMechanismMock($class) { $backend = $this->getMockBuilder(AuthMechanism::class) @@ -76,7 +76,7 @@ class BackendServiceTest extends \Test\TestCase { $backend = $this->getBackendMock('\Foo\Bar'); - /** @var \OCA\Files_External\Lib\Backend\Backend|\PHPUnit_Framework_MockObject_MockObject $backendAlias */ + /** @var \OCA\Files_External\Lib\Backend\Backend|\PHPUnit\Framework\MockObject\MockObject $backendAlias */ $backendAlias = $this->getMockBuilder(Backend::class) ->disableOriginalConstructor() ->getMock(); @@ -105,7 +105,7 @@ class BackendServiceTest extends \Test\TestCase { $backend1 = $this->getBackendMock('\Foo\Bar'); $backend2 = $this->getBackendMock('\Bar\Foo'); - /** @var IBackendProvider|\PHPUnit_Framework_MockObject_MockObject $providerMock */ + /** @var IBackendProvider|\PHPUnit\Framework\MockObject\MockObject $providerMock */ $providerMock = $this->createMock(IBackendProvider::class); $providerMock->expects($this->once()) ->method('getBackends') @@ -124,7 +124,7 @@ class BackendServiceTest extends \Test\TestCase { $backend1 = $this->getAuthMechanismMock('\Foo\Bar'); $backend2 = $this->getAuthMechanismMock('\Bar\Foo'); - /** @var IAuthMechanismProvider|\PHPUnit_Framework_MockObject_MockObject $providerMock */ + /** @var IAuthMechanismProvider|\PHPUnit\Framework\MockObject\MockObject $providerMock */ $providerMock = $this->createMock(IAuthMechanismProvider::class); $providerMock->expects($this->once()) ->method('getAuthMechanisms') @@ -145,13 +145,13 @@ class BackendServiceTest extends \Test\TestCase { $backend2 = $this->getBackendMock('\Dead\Beef'); - /** @var IBackendProvider|\PHPUnit_Framework_MockObject_MockObject $provider1Mock */ + /** @var IBackendProvider|\PHPUnit\Framework\MockObject\MockObject $provider1Mock */ $provider1Mock = $this->createMock(IBackendProvider::class); $provider1Mock->expects($this->once()) ->method('getBackends') ->willReturn([$backend1a, $backend1b]); $service->registerBackendProvider($provider1Mock); - /** @var IBackendProvider|\PHPUnit_Framework_MockObject_MockObject $provider2Mock */ + /** @var IBackendProvider|\PHPUnit\Framework\MockObject\MockObject $provider2Mock */ $provider2Mock = $this->createMock(IBackendProvider::class); $provider2Mock->expects($this->once()) ->method('getBackends') diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTest.php index 76f0a09c14b..5f10a9b9498 100644 --- a/apps/files_external/tests/Service/StoragesServiceTest.php +++ b/apps/files_external/tests/Service/StoragesServiceTest.php @@ -89,7 +89,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { protected static $hookCalls; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\OCP\Files\Config\IUserMountCache + * @var \PHPUnit\Framework\MockObject\MockObject|\OCP\Files\Config\IUserMountCache */ protected $mountCache; diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php index f99b25a9fc7..457808bff73 100644 --- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php @@ -42,7 +42,7 @@ use Test\Traits\UserTrait; class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { use UserTrait; - /** @var \OCP\IGroupManager|\PHPUnit_Framework_MockObject_MockObject groupManager */ + /** @var \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject groupManager */ protected $groupManager; /** @@ -67,7 +67,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { $this->globalStoragesService = $this->service; $this->user = new \OC\User\User(self::USER_ID, null, \OC::$server->getEventDispatcher()); - /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject $userSession */ + /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject $userSession */ $userSession = $this->createMock(IUserSession::class); $userSession ->expects($this->any()) diff --git a/apps/files_external/tests/Service/UserStoragesServiceTest.php b/apps/files_external/tests/Service/UserStoragesServiceTest.php index 9dd4a570c33..290b48c86c0 100644 --- a/apps/files_external/tests/Service/UserStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserStoragesServiceTest.php @@ -60,7 +60,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { $this->createUser($this->userId, $this->userId); $this->user = \OC::$server->getUserManager()->get($this->userId); - /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject $userSession */ + /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject $userSession */ $userSession = $this->createMock(IUserSession::class); $userSession ->expects($this->any()) diff --git a/apps/files_external/tests/Settings/AdminTest.php b/apps/files_external/tests/Settings/AdminTest.php index f8d6bce1d62..4d6a0ef6f8f 100644 --- a/apps/files_external/tests/Settings/AdminTest.php +++ b/apps/files_external/tests/Settings/AdminTest.php @@ -35,13 +35,13 @@ use Test\TestCase; class AdminTest extends TestCase { /** @var Admin */ private $admin; - /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ private $encryptionManager; - /** @var GlobalStoragesService|\PHPUnit_Framework_MockObject_MockObject */ + /** @var GlobalStoragesService|\PHPUnit\Framework\MockObject\MockObject */ private $globalStoragesService; - /** @var BackendService|\PHPUnit_Framework_MockObject_MockObject */ + /** @var BackendService|\PHPUnit\Framework\MockObject\MockObject */ private $backendService; - /** @var GlobalAuth|\PHPUnit_Framework_MockObject_MockObject */ + /** @var GlobalAuth|\PHPUnit\Framework\MockObject\MockObject */ private $globalAuth; protected function setUp(): void { |