diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-11 21:32:18 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-12 13:55:19 +0200 |
commit | 234b510652d117bb3ef9ef3b6315db3a2c2eb91b (patch) | |
tree | 880cec2bf4fe4846eff9fa5aa68d2671fb0495be /apps/twofactor_backupcodes/tests | |
parent | 138f47a1b980aaceb116b256b8ccf14f523e7e67 (diff) | |
download | nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.tar.gz nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.zip |
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/twofactor_backupcodes/tests')
6 files changed, 20 insertions, 23 deletions
diff --git a/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php index dbfc6fa70e1..e7f89f04ecf 100644 --- a/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php +++ b/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php @@ -41,7 +41,7 @@ class BackupCodeStorageTest extends TestCase { /** @var string */ private $testUID = 'test123456789'; - /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ private $notificationManager; protected function setUp(): void { diff --git a/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php b/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php index 464b65dbebb..8f56cc2fd59 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php @@ -32,18 +32,17 @@ use OCP\Activity\IManager; use OCP\IL10N; use OCP\IURLGenerator; use OCP\L10N\IFactory; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class ProviderTest extends TestCase { - /** @var IFactory|PHPUnit_Framework_MockObject_MockObject */ + /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; - /** @var IURLGenerator|PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; - /** @var IManager|PHPUnit_Framework_MockObject_MockObject */ + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ private $activityManager; /** @var Provider */ diff --git a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php index 1ced1dbf684..a05e2cccc22 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php @@ -35,13 +35,13 @@ use Test\TestCase; class SettingsControllerTest extends TestCase { - /** @var IRequest|PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var BackupCodeStorage|PHPUnit_Framework_MockObject_MockObject */ + /** @var BackupCodeStorage|\PHPUnit\Framework\MockObject\MockObject */ private $storage; - /** @var IUserSession|PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userSession; /** @var SettingsController */ diff --git a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php index bfcab556669..1c7faf6210f 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php @@ -69,11 +69,11 @@ class NotifierTest extends TestCase { ); } - + public function testPrepareWrongApp() { $this->expectException(\InvalidArgumentException::class); - /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */ + /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->createMock(INotification::class); $notification->expects($this->once()) ->method('getApp') @@ -84,11 +84,11 @@ class NotifierTest extends TestCase { $this->notifier->prepare($notification, 'en'); } - + public function testPrepareWrongSubject() { $this->expectException(\InvalidArgumentException::class); - /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */ + /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->createMock(INotification::class); $notification->expects($this->once()) ->method('getApp') @@ -101,7 +101,7 @@ class NotifierTest extends TestCase { } public function testPrepare() { - /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */ + /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->createMock(INotification::class); $notification->expects($this->once()) diff --git a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php index 1c33cca2cb6..d0d22bbcb5b 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php @@ -31,7 +31,6 @@ use OCP\IInitialStateService; use OCP\IL10N; use OCP\IUser; use OCP\Template; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class BackupCodesProviderTest extends TestCase { @@ -39,16 +38,16 @@ class BackupCodesProviderTest extends TestCase { /** @var string */ private $appName; - /** @var BackupCodeStorage|PHPUnit_Framework_MockObject_MockObject */ + /** @var BackupCodeStorage|\PHPUnit\Framework\MockObject\MockObject */ private $storage; - /** @var IL10N|PHPUnit_Framework_MockObject_MockObject */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; - /** @var AppManager|PHPUnit_Framework_MockObject_MockObject */ + /** @var AppManager|\PHPUnit\Framework\MockObject\MockObject */ private $appManager; - /** @var IInitialStateService|PHPUnit_Framework_MockObject_MockObject */ + /** @var IInitialStateService|\PHPUnit\Framework\MockObject\MockObject */ private $initialState; /** @var BackupCodesProvider */ diff --git a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php index 20cad61530d..ef17459cb06 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php @@ -32,21 +32,20 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\IUser; use OCP\Security\IHasher; use OCP\Security\ISecureRandom; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class BackupCodeStorageTest extends TestCase { - /** @var BackupCodeMapper|PHPUnit_Framework_MockObject_MockObject */ + /** @var BackupCodeMapper|\PHPUnit\Framework\MockObject\MockObject */ private $mapper; - /** @var ISecureRandom|PHPUnit_Framework_MockObject_MockObject */ + /** @var ISecureRandom|\PHPUnit\Framework\MockObject\MockObject */ private $random; - /** @var IHasher|PHPUnit_Framework_MockObject_MockObject */ + /** @var IHasher|\PHPUnit\Framework\MockObject\MockObject */ private $hasher; - /** @var IEventDispatcher|PHPUnit_Framework_MockObject_MockObject */ + /** @var IEventDispatcher|\PHPUnit\Framework\MockObject\MockObject */ private $eventDispatcher; /** @var BackupCodeStorage */ |