From 234b510652d117bb3ef9ef3b6315db3a2c2eb91b Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 11 Aug 2020 21:32:18 +0200 Subject: Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke --- tests/Core/Command/Config/App/DeleteConfigTest.php | 6 +- tests/Core/Command/Config/App/GetConfigTest.php | 6 +- tests/Core/Command/Config/App/SetConfigTest.php | 6 +- tests/Core/Command/Config/ImportTest.php | 6 +- tests/Core/Command/Config/ListConfigsTest.php | 8 +-- .../Command/Config/System/DeleteConfigTest.php | 6 +- tests/Core/Command/Config/System/GetConfigTest.php | 6 +- tests/Core/Command/Config/System/SetConfigTest.php | 6 +- .../Encryption/ChangeKeyStorageRootTest.php | 18 +++--- tests/Core/Command/Encryption/DecryptAllTest.php | 16 ++--- tests/Core/Command/Encryption/DisableTest.php | 6 +- tests/Core/Command/Encryption/EnableTest.php | 8 +-- tests/Core/Command/Encryption/EncryptAllTest.php | 16 ++--- .../Command/Encryption/SetDefaultModuleTest.php | 8 +-- tests/Core/Command/Group/AddTest.php | 6 +- tests/Core/Command/Group/AddUserTest.php | 8 +-- tests/Core/Command/Group/DeleteTest.php | 6 +- tests/Core/Command/Group/ListCommandTest.php | 8 +-- tests/Core/Command/Group/RemoveUserTest.php | 8 +-- tests/Core/Command/Log/FileTest.php | 6 +- tests/Core/Command/Log/ManageTest.php | 14 ++--- .../Command/Maintenance/DataFingerprintTest.php | 8 +-- .../Command/Maintenance/Mimetype/UpdateDBTest.php | 4 +- tests/Core/Command/Maintenance/UpdateTheme.php | 4 +- tests/Core/Command/User/DeleteTest.php | 6 +- tests/Core/Command/User/DisableTest.php | 6 +- tests/Core/Command/User/EnableTest.php | 6 +- tests/Core/Command/User/LastSeenTest.php | 6 +- tests/Core/Command/User/SettingTest.php | 10 ++-- .../Core/Controller/AppPasswordControllerTest.php | 2 +- tests/Core/Controller/AvatarControllerTest.php | 22 +++---- tests/Core/Controller/CSRFTokenControllerTest.php | 5 +- .../Controller/ChangePasswordControllerTest.php | 12 ++-- .../Controller/ClientFlowLoginControllerTest.php | 24 ++++---- .../Core/Controller/ContactsMenuControllerTest.php | 7 +-- tests/Core/Controller/CssControllerTest.php | 8 +-- .../Core/Controller/GuestAvatarControllerTest.php | 10 ++-- tests/Core/Controller/JsControllerTest.php | 8 +-- tests/Core/Controller/LostControllerTest.php | 27 +++++---- tests/Core/Controller/NavigationControllerTest.php | 6 +- tests/Core/Controller/OCSControllerTest.php | 10 ++-- tests/Core/Controller/PreviewControllerTest.php | 6 +- tests/Core/Controller/SvgControllerTest.php | 2 +- .../TwoFactorChallengeControllerTest.php | 13 ++--- tests/Core/Controller/UserControllerTest.php | 2 +- tests/lib/Accounts/HooksTest.php | 6 +- tests/lib/Activity/ManagerTest.php | 18 +++--- tests/lib/App/AppStore/Bundles/BundleBase.php | 2 +- .../lib/App/AppStore/Bundles/BundleFetcherTest.php | 2 +- tests/lib/App/AppStore/Fetcher/AppFetcherTest.php | 15 +++-- tests/lib/App/AppStore/Fetcher/FetcherBase.php | 12 ++-- tests/lib/App/DependencyAnalyzerTest.php | 2 +- tests/lib/AppConfigTest.php | 2 +- .../Controller/AuthPublicShareControllerTest.php | 8 +-- .../Controller/PublicShareControllerTest.php | 6 +- .../DependencyInjection/DIContainerTest.php | 2 +- .../AppFramework/Http/FileDisplayResponseTest.php | 2 +- .../PublicShare/PublicShareMiddlewareTest.php | 6 +- .../Security/BruteForceMiddlewareTest.php | 22 +++---- .../Middleware/Security/CORSMiddlewareTest.php | 4 +- .../PasswordConfirmationMiddlewareTest.php | 8 +-- .../Security/RateLimitingMiddlewareTest.php | 26 ++++----- .../Security/SameSiteCookieMiddlewareTest.php | 4 +- .../Middleware/Security/SecurityMiddlewareTest.php | 16 ++--- .../Authentication/LoginCredentials/StoreTest.php | 7 +-- .../Token/DefaultTokenMapperTest.php | 8 +-- .../Token/DefaultTokenProviderTest.php | 20 +++---- .../Token/PublicKeyTokenMapperTest.php | 10 ++-- .../Token/PublicKeyTokenProviderTest.php | 16 ++--- .../TwoFactorAuth/ProviderLoaderTest.php | 7 +-- tests/lib/Avatar/AvatarManagerTest.php | 14 ++--- tests/lib/Avatar/UserAvatarTest.php | 8 +-- tests/lib/BackgroundJob/JobListTest.php | 4 +- tests/lib/Calendar/ManagerTest.php | 18 +++--- .../Collaborators/GroupPluginTest.php | 10 ++-- .../Collaborators/LookupPluginTest.php | 20 +++---- .../Collaboration/Collaborators/MailPluginTest.php | 12 ++-- .../Collaborators/RemotePluginTest.php | 8 +-- .../Collaborators/SearchResultTest.php | 2 +- .../lib/Collaboration/Collaborators/SearchTest.php | 2 +- .../Collaboration/Collaborators/UserPluginTest.php | 10 ++-- tests/lib/Command/Integrity/SignAppTest.php | 6 +- tests/lib/Command/Integrity/SignCoreTest.php | 4 +- tests/lib/Comments/ManagerTest.php | 32 +++++----- .../ContactsMenu/ActionProviderStoreTest.php | 9 ++- .../Contacts/ContactsMenu/ContactsStoreTest.php | 33 +++++------ tests/lib/Contacts/ContactsMenu/ManagerTest.php | 9 ++- .../ContactsMenu/Providers/EMailproviderTest.php | 5 +- tests/lib/ContactsManagerTest.php | 20 +++---- tests/lib/DB/MDB2SchemaReaderTest.php | 2 +- tests/lib/DB/MigrationsTest.php | 4 +- tests/lib/DB/QueryBuilder/QueryBuilderTest.php | 4 +- tests/lib/Encryption/DecryptAllTest.php | 22 +++---- tests/lib/Encryption/EncryptionWrapperTest.php | 6 +- tests/lib/Encryption/Keys/StorageTest.php | 6 +- tests/lib/Encryption/ManagerTest.php | 16 ++--- tests/lib/Encryption/UpdateTest.php | 14 ++--- tests/lib/Encryption/UtilTest.php | 10 ++-- tests/lib/Files/AppData/AppDataTest.php | 4 +- tests/lib/Files/AppData/FactoryTest.php | 4 +- tests/lib/Files/Cache/CacheTest.php | 2 +- tests/lib/Files/Cache/QuerySearchHelperTest.php | 2 +- .../Files/Mount/ObjectHomeMountProviderTest.php | 8 +-- tests/lib/Files/Node/FileTest.php | 20 +++---- tests/lib/Files/Node/FolderTest.php | 60 +++++++++---------- tests/lib/Files/Node/NodeTest.php | 44 +++++++------- tests/lib/Files/Node/RootTest.php | 24 ++++---- tests/lib/Files/SimpleFS/SimpleFileTest.php | 2 +- tests/lib/Files/Storage/Wrapper/EncryptionTest.php | 34 +++++------ tests/lib/Files/Stream/EncryptionTest.php | 4 +- tests/lib/Files/ViewTest.php | 26 ++++----- tests/lib/GlobalScale/ConfigTest.php | 4 +- tests/lib/Group/ManagerTest.php | 68 +++++++++++----------- tests/lib/InstallerTest.php | 10 ++-- tests/lib/IntegrityCheck/CheckerTest.php | 24 ++++---- tests/lib/L10N/FactoryTest.php | 8 +-- tests/lib/L10N/LanguageIteratorTest.php | 4 +- tests/lib/Log/LogFactoryTest.php | 4 +- tests/lib/LoggerTest.php | 4 +- tests/lib/Mail/EMailTemplateTest.php | 6 +- tests/lib/Mail/MailerTest.php | 10 ++-- tests/lib/Mail/MessageTest.php | 8 +-- tests/lib/Migration/BackgroundRepairTest.php | 8 +-- tests/lib/NavigationManagerTest.php | 12 ++-- tests/lib/Notification/ManagerTest.php | 10 ++-- tests/lib/Notification/NotificationTest.php | 28 ++++----- tests/lib/OCS/DiscoveryServiceTest.php | 4 +- tests/lib/Preview/GeneratorTest.php | 10 ++-- tests/lib/Repair/CleanTagsTest.php | 2 +- tests/lib/Repair/NC11/FixMountStoragesTest.php | 2 +- tests/lib/Repair/OldGroupMembershipSharesTest.php | 6 +- tests/lib/Repair/RepairCollationTest.php | 2 +- tests/lib/Repair/RepairInvalidSharesTest.php | 4 +- tests/lib/Repair/RepairMimeTypesTest.php | 4 +- tests/lib/Repair/RepairSqliteAutoincrementTest.php | 2 +- tests/lib/Security/Bruteforce/CapabilitiesTest.php | 4 +- tests/lib/Security/Bruteforce/ThrottlerTest.php | 4 +- tests/lib/Security/CertificateManagerTest.php | 4 +- tests/lib/Security/IdentityProof/ManagerTest.php | 10 ++-- tests/lib/Security/IdentityProof/SignerTest.php | 6 +- .../RateLimiting/Backend/MemoryCacheTest.php | 6 +- tests/lib/Security/RateLimiting/LimiterTest.php | 12 ++-- tests/lib/Session/CryptoSessionDataTest.php | 2 +- tests/lib/Session/CryptoWrappingTest.php | 4 +- tests/lib/Settings/ManagerTest.php | 12 ++-- tests/lib/SetupTest.php | 18 +++--- tests/lib/Share20/DefaultShareProviderTest.php | 14 ++--- tests/lib/Share20/ShareHelperTest.php | 12 ++-- tests/lib/Share20/ShareTest.php | 10 ++-- tests/lib/Support/Subscription/RegistryTest.php | 8 +-- tests/lib/Template/CSSResourceLocatorTest.php | 18 +++--- tests/lib/Template/IconsCacherTest.php | 10 ++-- tests/lib/Template/JSCombinerTest.php | 12 ++-- tests/lib/Template/JSResourceLocatorTest.php | 10 ++-- tests/lib/Template/ResourceLocatorTest.php | 4 +- tests/lib/Template/SCSSCacherTest.php | 20 +++---- tests/lib/TestCase.php | 4 +- tests/lib/Traits/ClientServiceTrait.php | 8 +-- tests/lib/Updater/ChangesCheckTest.php | 6 +- tests/lib/Updater/VersionCheckTest.php | 4 +- tests/lib/UpdaterTest.php | 8 +-- tests/lib/UrlGeneratorTest.php | 6 +- tests/lib/User/ManagerTest.php | 48 +++++++-------- tests/lib/User/UserTest.php | 68 +++++++++++----------- tests/lib/UtilCheckServerTest.php | 2 +- 165 files changed, 877 insertions(+), 888 deletions(-) (limited to 'tests') diff --git a/tests/Core/Command/Config/App/DeleteConfigTest.php b/tests/Core/Command/Config/App/DeleteConfigTest.php index 442b9c5a8ef..2c9482b57f6 100644 --- a/tests/Core/Command/Config/App/DeleteConfigTest.php +++ b/tests/Core/Command/Config/App/DeleteConfigTest.php @@ -28,12 +28,12 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DeleteConfigTest extends TestCase { - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Config/App/GetConfigTest.php b/tests/Core/Command/Config/App/GetConfigTest.php index 75e51a68b2f..521ecfbfb40 100644 --- a/tests/Core/Command/Config/App/GetConfigTest.php +++ b/tests/Core/Command/Config/App/GetConfigTest.php @@ -28,12 +28,12 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class GetConfigTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Config/App/SetConfigTest.php b/tests/Core/Command/Config/App/SetConfigTest.php index 3077f74b369..88053f8c189 100644 --- a/tests/Core/Command/Config/App/SetConfigTest.php +++ b/tests/Core/Command/Config/App/SetConfigTest.php @@ -28,12 +28,12 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class SetConfigTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Config/ImportTest.php b/tests/Core/Command/Config/ImportTest.php index 2c0a6e3d8fd..c9cc256bea9 100644 --- a/tests/Core/Command/Config/ImportTest.php +++ b/tests/Core/Command/Config/ImportTest.php @@ -28,12 +28,12 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class ImportTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Config/ListConfigsTest.php b/tests/Core/Command/Config/ListConfigsTest.php index 2cab9500702..01d5f512494 100644 --- a/tests/Core/Command/Config/ListConfigsTest.php +++ b/tests/Core/Command/Config/ListConfigsTest.php @@ -30,14 +30,14 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class ListConfigsTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $appConfig; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $systemConfig; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Config/System/DeleteConfigTest.php b/tests/Core/Command/Config/System/DeleteConfigTest.php index ee27fa587bc..b72f06b35bf 100644 --- a/tests/Core/Command/Config/System/DeleteConfigTest.php +++ b/tests/Core/Command/Config/System/DeleteConfigTest.php @@ -28,12 +28,12 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DeleteConfigTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $systemConfig; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Config/System/GetConfigTest.php b/tests/Core/Command/Config/System/GetConfigTest.php index 175a24eb354..3a6bb1acb50 100644 --- a/tests/Core/Command/Config/System/GetConfigTest.php +++ b/tests/Core/Command/Config/System/GetConfigTest.php @@ -28,12 +28,12 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class GetConfigTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $systemConfig; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Config/System/SetConfigTest.php b/tests/Core/Command/Config/System/SetConfigTest.php index 0a446c5fd1e..a53607e8a39 100644 --- a/tests/Core/Command/Config/System/SetConfigTest.php +++ b/tests/Core/Command/Config/System/SetConfigTest.php @@ -28,12 +28,12 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class SetConfigTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $systemConfig; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php index 1d33dc570b6..02cc824ee0c 100644 --- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php +++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php @@ -38,28 +38,28 @@ class ChangeKeyStorageRootTest extends TestCase { /** @var ChangeKeyStorageRoot */ protected $changeKeyStorageRoot; - /** @var View | \PHPUnit_Framework_MockObject_MockObject */ + /** @var View | \PHPUnit\Framework\MockObject\MockObject */ protected $view; - /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject */ protected $userManager; - /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var Util | \PHPUnit_Framework_MockObject_MockObject */ + /** @var Util | \PHPUnit\Framework\MockObject\MockObject */ protected $util; - /** @var QuestionHelper | \PHPUnit_Framework_MockObject_MockObject */ + /** @var QuestionHelper | \PHPUnit\Framework\MockObject\MockObject */ protected $questionHelper; - /** @var InputInterface | \PHPUnit_Framework_MockObject_MockObject */ + /** @var InputInterface | \PHPUnit\Framework\MockObject\MockObject */ protected $inputInterface; - /** @var OutputInterface | \PHPUnit_Framework_MockObject_MockObject */ + /** @var OutputInterface | \PHPUnit\Framework\MockObject\MockObject */ protected $outputInterface; - /** @var \OCP\UserInterface | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\UserInterface | \PHPUnit\Framework\MockObject\MockObject */ protected $userInterface; protected function setUp(): void { @@ -362,7 +362,7 @@ class ChangeKeyStorageRootTest extends TestCase { ); } - + public function testTargetExistsException() { $this->expectException(\Exception::class); diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php index 33140fa2644..12ace5fe371 100644 --- a/tests/Core/Command/Encryption/DecryptAllTest.php +++ b/tests/Core/Command/Encryption/DecryptAllTest.php @@ -32,25 +32,25 @@ use Test\TestCase; class DecryptAllTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IConfig */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IConfig */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\Encryption\IManager */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Encryption\IManager */ protected $encryptionManager; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\App\IAppManager */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\App\IAppManager */ protected $appManager; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Input\InputInterface */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Input\InputInterface */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Output\OutputInterface */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Output\OutputInterface */ protected $consoleOutput; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Helper\QuestionHelper */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Helper\QuestionHelper */ protected $questionHelper; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Encryption\DecryptAll */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Encryption\DecryptAll */ protected $decryptAll; protected function setUp(): void { @@ -178,7 +178,7 @@ class DecryptAllTest extends TestCase { ]; } - + public function testExecuteFailure() { $this->expectException(\Exception::class); diff --git a/tests/Core/Command/Encryption/DisableTest.php b/tests/Core/Command/Encryption/DisableTest.php index 4d088073380..bd29caafec3 100644 --- a/tests/Core/Command/Encryption/DisableTest.php +++ b/tests/Core/Command/Encryption/DisableTest.php @@ -28,11 +28,11 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DisableTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Encryption/EnableTest.php b/tests/Core/Command/Encryption/EnableTest.php index f76638c0ecf..c1656054ecd 100644 --- a/tests/Core/Command/Encryption/EnableTest.php +++ b/tests/Core/Command/Encryption/EnableTest.php @@ -29,13 +29,13 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class EnableTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $manager; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Encryption/EncryptAllTest.php b/tests/Core/Command/Encryption/EncryptAllTest.php index add57c0d9e5..68cd4971e4f 100644 --- a/tests/Core/Command/Encryption/EncryptAllTest.php +++ b/tests/Core/Command/Encryption/EncryptAllTest.php @@ -33,25 +33,25 @@ use Test\TestCase; class EncryptAllTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\IConfig */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IConfig */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\Encryption\IManager */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Encryption\IManager */ protected $encryptionManager; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\App\IAppManager */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\App\IAppManager */ protected $appManager; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Input\InputInterface */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Input\InputInterface */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Output\OutputInterface */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Output\OutputInterface */ protected $consoleOutput; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Helper\QuestionHelper */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Helper\QuestionHelper */ protected $questionHelper; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\Encryption\IEncryptionModule */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\Encryption\IEncryptionModule */ protected $encryptionModule; /** @var EncryptAll */ @@ -125,7 +125,7 @@ class EncryptAllTest extends TestCase { ]; } - + public function testExecuteException() { $this->expectException(\Exception::class); diff --git a/tests/Core/Command/Encryption/SetDefaultModuleTest.php b/tests/Core/Command/Encryption/SetDefaultModuleTest.php index f2f1d1cfc67..015964e1357 100644 --- a/tests/Core/Command/Encryption/SetDefaultModuleTest.php +++ b/tests/Core/Command/Encryption/SetDefaultModuleTest.php @@ -29,13 +29,13 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class SetDefaultModuleTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject|IManager */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IManager */ protected $manager; - /** @var \PHPUnit_Framework_MockObject_MockObject|IConfig */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IConfig */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Group/AddTest.php b/tests/Core/Command/Group/AddTest.php index 35449a9e3f4..65806fa538b 100644 --- a/tests/Core/Command/Group/AddTest.php +++ b/tests/Core/Command/Group/AddTest.php @@ -32,16 +32,16 @@ use Test\TestCase; class AddTest extends TestCase { - /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ private $groupManager; /** @var Add */ private $command; - /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */ private $input; - /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */ private $output; protected function setUp(): void { diff --git a/tests/Core/Command/Group/AddUserTest.php b/tests/Core/Command/Group/AddUserTest.php index 3f7f811b7e8..08b2630b4b8 100644 --- a/tests/Core/Command/Group/AddUserTest.php +++ b/tests/Core/Command/Group/AddUserTest.php @@ -34,19 +34,19 @@ use Test\TestCase; class AddUserTest extends TestCase { - /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ private $groupManager; - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; /** @var AddUser */ private $command; - /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */ private $input; - /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */ private $output; protected function setUp(): void { diff --git a/tests/Core/Command/Group/DeleteTest.php b/tests/Core/Command/Group/DeleteTest.php index 60d41d2e24c..3b29fb4e6ad 100644 --- a/tests/Core/Command/Group/DeleteTest.php +++ b/tests/Core/Command/Group/DeleteTest.php @@ -32,16 +32,16 @@ use Test\TestCase; class DeleteTest extends TestCase { - /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ private $groupManager; /** @var Delete */ private $command; - /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */ private $input; - /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */ private $output; protected function setUp(): void { diff --git a/tests/Core/Command/Group/ListCommandTest.php b/tests/Core/Command/Group/ListCommandTest.php index 4c539728949..1c1dd3c95eb 100644 --- a/tests/Core/Command/Group/ListCommandTest.php +++ b/tests/Core/Command/Group/ListCommandTest.php @@ -33,16 +33,16 @@ use Test\TestCase; class ListCommandTest extends TestCase { - /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ private $groupManager; - /** @var ListCommand|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ListCommand|\PHPUnit\Framework\MockObject\MockObject */ private $command; - /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */ private $input; - /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */ private $output; protected function setUp(): void { diff --git a/tests/Core/Command/Group/RemoveUserTest.php b/tests/Core/Command/Group/RemoveUserTest.php index 906247d0896..141483861c4 100644 --- a/tests/Core/Command/Group/RemoveUserTest.php +++ b/tests/Core/Command/Group/RemoveUserTest.php @@ -34,19 +34,19 @@ use Test\TestCase; class RemoveUserTest extends TestCase { - /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ private $groupManager; - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; /** @var RemoveUser */ private $command; - /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */ private $input; - /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */ private $output; protected function setUp(): void { diff --git a/tests/Core/Command/Log/FileTest.php b/tests/Core/Command/Log/FileTest.php index 4ecbf8914b6..1a8a86759f5 100644 --- a/tests/Core/Command/Log/FileTest.php +++ b/tests/Core/Command/Log/FileTest.php @@ -28,11 +28,11 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class FileTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Log/ManageTest.php b/tests/Core/Command/Log/ManageTest.php index 2724bba64dd..6683291a9b8 100644 --- a/tests/Core/Command/Log/ManageTest.php +++ b/tests/Core/Command/Log/ManageTest.php @@ -28,11 +28,11 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class ManageTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ @@ -86,14 +86,14 @@ class ManageTest extends TestCase { self::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]); } - + public function testValidateBackend() { $this->expectException(\InvalidArgumentException::class); self::invokePrivate($this->command, 'validateBackend', ['notabackend']); } - + public function testValidateTimezone() { $this->expectException(\Exception::class); @@ -122,7 +122,7 @@ class ManageTest extends TestCase { ); } - + public function testConvertLevelStringInvalid() { $this->expectException(\InvalidArgumentException::class); @@ -148,7 +148,7 @@ class ManageTest extends TestCase { ); } - + public function testConvertLevelNumberInvalid() { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/Core/Command/Maintenance/DataFingerprintTest.php b/tests/Core/Command/Maintenance/DataFingerprintTest.php index 5cc816627e6..185a8d1576a 100644 --- a/tests/Core/Command/Maintenance/DataFingerprintTest.php +++ b/tests/Core/Command/Maintenance/DataFingerprintTest.php @@ -29,13 +29,13 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DataFingerprintTest extends TestCase { - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $timeFactory; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php index d7238921af5..bd08a5348a2 100644 --- a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php +++ b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php @@ -36,9 +36,9 @@ class UpdateDBTest extends TestCase { /** @var IMimeTypeLoader */ protected $loader; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/Maintenance/UpdateTheme.php b/tests/Core/Command/Maintenance/UpdateTheme.php index bb6f5f45095..bf460b44d4e 100644 --- a/tests/Core/Command/Maintenance/UpdateTheme.php +++ b/tests/Core/Command/Maintenance/UpdateTheme.php @@ -39,9 +39,9 @@ class UpdateThemeTest extends TestCase { protected $cacheFactory; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/User/DeleteTest.php b/tests/Core/Command/User/DeleteTest.php index ec65984bef8..6ac0ed0353c 100644 --- a/tests/Core/Command/User/DeleteTest.php +++ b/tests/Core/Command/User/DeleteTest.php @@ -29,11 +29,11 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DeleteTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $userManager; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/User/DisableTest.php b/tests/Core/Command/User/DisableTest.php index 5fb4633dc00..0e1d1b72ac4 100644 --- a/tests/Core/Command/User/DisableTest.php +++ b/tests/Core/Command/User/DisableTest.php @@ -31,11 +31,11 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class DisableTest extends TestCase { - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ protected $userManager; - /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var Disable */ diff --git a/tests/Core/Command/User/EnableTest.php b/tests/Core/Command/User/EnableTest.php index 4babe0d91c1..6ff82aac673 100644 --- a/tests/Core/Command/User/EnableTest.php +++ b/tests/Core/Command/User/EnableTest.php @@ -31,11 +31,11 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class EnableTest extends TestCase { - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ protected $userManager; - /** @var InputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var InputInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var OutputInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var Disable */ diff --git a/tests/Core/Command/User/LastSeenTest.php b/tests/Core/Command/User/LastSeenTest.php index 0a402a30119..f861c2e5f77 100644 --- a/tests/Core/Command/User/LastSeenTest.php +++ b/tests/Core/Command/User/LastSeenTest.php @@ -29,11 +29,11 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class LastSeenTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $userManager; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; /** @var \Symfony\Component\Console\Command\Command */ diff --git a/tests/Core/Command/User/SettingTest.php b/tests/Core/Command/User/SettingTest.php index 02a4dbfec09..768a79a746e 100644 --- a/tests/Core/Command/User/SettingTest.php +++ b/tests/Core/Command/User/SettingTest.php @@ -30,15 +30,15 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class SettingTest extends TestCase { - /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */ protected $userManager; - /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \OCP\IDBConnection|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IDBConnection|\PHPUnit\Framework\MockObject\MockObject */ protected $connection; - /** @var \Symfony\Component\Console\Input\InputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Symfony\Component\Console\Input\InputInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; - /** @var \Symfony\Component\Console\Output\OutputInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Symfony\Component\Console\Output\OutputInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; protected function setUp(): void { diff --git a/tests/Core/Controller/AppPasswordControllerTest.php b/tests/Core/Controller/AppPasswordControllerTest.php index f2c104efbe0..91cf53bd585 100644 --- a/tests/Core/Controller/AppPasswordControllerTest.php +++ b/tests/Core/Controller/AppPasswordControllerTest.php @@ -59,7 +59,7 @@ class AppPasswordControllerTest extends TestCase { /** @var IRequest|MockObject */ private $request; - /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */ private $eventDispatcher; /** @var AppPasswordController */ diff --git a/tests/Core/Controller/AvatarControllerTest.php b/tests/Core/Controller/AvatarControllerTest.php index 38876f02681..f070897e1b1 100644 --- a/tests/Core/Controller/AvatarControllerTest.php +++ b/tests/Core/Controller/AvatarControllerTest.php @@ -59,28 +59,28 @@ use PHPUnit\Framework\MockObject\MockObject; class AvatarControllerTest extends \Test\TestCase { /** @var AvatarController */ private $avatarController; - /** @var IAvatar|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAvatar|\PHPUnit\Framework\MockObject\MockObject */ private $avatarMock; - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */ private $userMock; - /** @var File|\PHPUnit_Framework_MockObject_MockObject */ + /** @var File|\PHPUnit\Framework\MockObject\MockObject */ private $avatarFile; - /** @var IAvatarManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAvatarManager|\PHPUnit\Framework\MockObject\MockObject */ private $avatarManager; - /** @var ICache|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICache|\PHPUnit\Framework\MockObject\MockObject */ private $cache; - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l; - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; - /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */ private $rootFolder; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var TimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var TimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; /** @var IAccountManager|MockObject */ private $accountManager; diff --git a/tests/Core/Controller/CSRFTokenControllerTest.php b/tests/Core/Controller/CSRFTokenControllerTest.php index 557a6c5f6f0..875d5a79168 100644 --- a/tests/Core/Controller/CSRFTokenControllerTest.php +++ b/tests/Core/Controller/CSRFTokenControllerTest.php @@ -30,7 +30,6 @@ use OC\Security\CSRF\CsrfTokenManager; use OCP\AppFramework\Http; use OCP\AppFramework\Http\JSONResponse; use OCP\IRequest; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class CSRFTokenControllerTest extends TestCase { @@ -38,10 +37,10 @@ class CSRFTokenControllerTest extends TestCase { /** @var CSRFTokenController */ private $controller; - /** @var IRequest|PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var CsrfTokenManager|PHPUnit_Framework_MockObject_MockObject */ + /** @var CsrfTokenManager|\PHPUnit\Framework\MockObject\MockObject */ private $tokenManager; protected function setUp(): void { diff --git a/tests/Core/Controller/ChangePasswordControllerTest.php b/tests/Core/Controller/ChangePasswordControllerTest.php index 21a80b61063..dfd65aed47f 100644 --- a/tests/Core/Controller/ChangePasswordControllerTest.php +++ b/tests/Core/Controller/ChangePasswordControllerTest.php @@ -38,15 +38,15 @@ class ChangePasswordControllerTest extends \Test\TestCase { private $userId = 'currentUser'; /** @var string */ private $loginName = 'ua1337'; - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; - /** @var Session|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Session|\PHPUnit\Framework\MockObject\MockObject */ private $userSession; - /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ private $groupManager; - /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */ private $appManager; - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l; /** @var ChangePasswordController */ private $controller; @@ -61,7 +61,7 @@ class ChangePasswordControllerTest extends \Test\TestCase { $this->l = $this->createMock(IL10N::class); $this->l->method('t')->willReturnArgument(0); - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject $request */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject $request */ $request = $this->createMock(IRequest::class); $this->controller = new ChangePasswordController( diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php index bc86c262d91..037147e01b7 100644 --- a/tests/Core/Controller/ClientFlowLoginControllerTest.php +++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php @@ -45,29 +45,29 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Test\TestCase; class ClientFlowLoginControllerTest extends TestCase { - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userSession; - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; - /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject */ private $defaults; - /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */ private $session; - /** @var IProvider|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IProvider|\PHPUnit\Framework\MockObject\MockObject */ private $tokenProvider; - /** @var ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ISecureRandom|\PHPUnit\Framework\MockObject\MockObject */ private $random; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; - /** @var ClientMapper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ClientMapper|\PHPUnit\Framework\MockObject\MockObject */ private $clientMapper; - /** @var AccessTokenMapper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var AccessTokenMapper|\PHPUnit\Framework\MockObject\MockObject */ private $accessTokenMapper; - /** @var ICrypto|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICrypto|\PHPUnit\Framework\MockObject\MockObject */ private $crypto; - /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */ private $eventDispatcher; diff --git a/tests/Core/Controller/ContactsMenuControllerTest.php b/tests/Core/Controller/ContactsMenuControllerTest.php index 24f1adb10f2..a702a155860 100644 --- a/tests/Core/Controller/ContactsMenuControllerTest.php +++ b/tests/Core/Controller/ContactsMenuControllerTest.php @@ -30,18 +30,17 @@ use OCP\Contacts\ContactsMenu\IEntry; use OCP\IRequest; use OCP\IUser; use OCP\IUserSession; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class ContactsMenuControllerTest extends TestCase { - /** @var IRequest|PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var IUserSession|PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userSession; - /** @var Manager|PHPUnit_Framework_MockObject_MockObject */ + /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */ private $contactsManager; /** @var ContactsMenuController */ diff --git a/tests/Core/Controller/CssControllerTest.php b/tests/Core/Controller/CssControllerTest.php index 93151065b3c..1179bc0c070 100644 --- a/tests/Core/Controller/CssControllerTest.php +++ b/tests/Core/Controller/CssControllerTest.php @@ -39,10 +39,10 @@ use Test\TestCase; class CssControllerTest extends TestCase { - /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ private $appData; - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; /** @var CssController */ @@ -51,7 +51,7 @@ class CssControllerTest extends TestCase { protected function setUp(): void { parent::setUp(); - /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ + /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */ $factory = $this->createMock(Factory::class); $this->appData = $this->createMock(AppData::class); $factory->expects($this->once()) @@ -59,7 +59,7 @@ class CssControllerTest extends TestCase { ->with('css') ->willReturn($this->appData); - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject $timeFactory */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject $timeFactory */ $timeFactory = $this->createMock(ITimeFactory::class); $timeFactory->method('getTime') ->willReturn(1337); diff --git a/tests/Core/Controller/GuestAvatarControllerTest.php b/tests/Core/Controller/GuestAvatarControllerTest.php index dd8188b002f..8870faac4c7 100644 --- a/tests/Core/Controller/GuestAvatarControllerTest.php +++ b/tests/Core/Controller/GuestAvatarControllerTest.php @@ -21,27 +21,27 @@ class GuestAvatarControllerTest extends \Test\TestCase { private $guestAvatarController; /** - * @var IRequest|\PHPUnit_Framework_MockObject_MockObject + * @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; /** - * @var IAvatarManager|\PHPUnit_Framework_MockObject_MockObject + * @var IAvatarManager|\PHPUnit\Framework\MockObject\MockObject */ private $avatarManager; /** - * @var IAvatar|\PHPUnit_Framework_MockObject_MockObject + * @var IAvatar|\PHPUnit\Framework\MockObject\MockObject */ private $avatar; /** - * @var \OCP\Files\File|\PHPUnit_Framework_MockObject_MockObject + * @var \OCP\Files\File|\PHPUnit\Framework\MockObject\MockObject */ private $file; /** - * @var ILogger|\PHPUnit_Framework_MockObject_MockObject + * @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; diff --git a/tests/Core/Controller/JsControllerTest.php b/tests/Core/Controller/JsControllerTest.php index 99f58d7e9d8..01228a6a93e 100644 --- a/tests/Core/Controller/JsControllerTest.php +++ b/tests/Core/Controller/JsControllerTest.php @@ -39,19 +39,19 @@ use Test\TestCase; class JsControllerTest extends TestCase { - /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ private $appData; /** @var JsController */ private $controller; - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; protected function setUp(): void { parent::setUp(); - /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ + /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */ $factory = $this->createMock(Factory::class); $this->appData = $this->createMock(AppData::class); $factory->expects($this->once()) @@ -59,7 +59,7 @@ class JsControllerTest extends TestCase { ->with('js') ->willReturn($this->appData); - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject $timeFactory */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject $timeFactory */ $timeFactory = $this->createMock(ITimeFactory::class); $timeFactory->method('getTime') ->willReturn(1337); diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php index 09f224131f5..4742e7ae425 100644 --- a/tests/Core/Controller/LostControllerTest.php +++ b/tests/Core/Controller/LostControllerTest.php @@ -42,7 +42,6 @@ use OCP\Mail\IEMailTemplate; use OCP\Mail\IMailer; use OCP\Security\ICrypto; use OCP\Security\ISecureRandom; -use PHPUnit_Framework_MockObject_MockObject; /** * Class LostControllerTest @@ -55,33 +54,33 @@ class LostControllerTest extends \Test\TestCase { private $lostController; /** @var IUser */ private $existingUser; - /** @var IURLGenerator | PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator | \PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; /** @var IL10N */ private $l10n; - /** @var IUserManager | PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject */ private $userManager; /** @var Defaults */ private $defaults; - /** @var IConfig | PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var IMailer | PHPUnit_Framework_MockObject_MockObject */ + /** @var IMailer | \PHPUnit\Framework\MockObject\MockObject */ private $mailer; - /** @var ISecureRandom | PHPUnit_Framework_MockObject_MockObject */ + /** @var ISecureRandom | \PHPUnit\Framework\MockObject\MockObject */ private $secureRandom; - /** @var IManager|PHPUnit_Framework_MockObject_MockObject */ + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ private $encryptionManager; - /** @var ITimeFactory | PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory | \PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; - /** @var IRequest */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var ICrypto|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICrypto|\PHPUnit\Framework\MockObject\MockObject */ private $crypto; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */ private $twofactorManager; - /** @var IInitialStateService|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IInitialStateService|\PHPUnit\Framework\MockObject\MockObject */ private $initialStateService; protected function setUp(): void { @@ -762,7 +761,7 @@ class LostControllerTest extends \Test\TestCase { } public function testSetPasswordEncryptionDontProceedPerUserKey() { - /** @var IEncryptionModule|PHPUnit_Framework_MockObject_MockObject $encryptionModule */ + /** @var IEncryptionModule|\PHPUnit\Framework\MockObject\MockObject $encryptionModule */ $encryptionModule = $this->createMock(IEncryptionModule::class); $encryptionModule->expects($this->once())->method('needDetailedAccessList')->willReturn(true); $this->encryptionManager->expects($this->once())->method('getEncryptionModules') diff --git a/tests/Core/Controller/NavigationControllerTest.php b/tests/Core/Controller/NavigationControllerTest.php index 254013a7350..e98d0e8ed40 100644 --- a/tests/Core/Controller/NavigationControllerTest.php +++ b/tests/Core/Controller/NavigationControllerTest.php @@ -33,13 +33,13 @@ use Test\TestCase; class NavigationControllerTest extends TestCase { - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var INavigationManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var INavigationManager|\PHPUnit\Framework\MockObject\MockObject */ private $navigationManager; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; /** @var NavigationController */ diff --git a/tests/Core/Controller/OCSControllerTest.php b/tests/Core/Controller/OCSControllerTest.php index c7cf601282b..cb1b9379a90 100644 --- a/tests/Core/Controller/OCSControllerTest.php +++ b/tests/Core/Controller/OCSControllerTest.php @@ -34,15 +34,15 @@ use OCP\IUserSession; use Test\TestCase; class OCSControllerTest extends TestCase { - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var CapabilitiesManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var CapabilitiesManager|\PHPUnit\Framework\MockObject\MockObject */ private $capabilitiesManager; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userSession; - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; - /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */ private $keyManager; /** @var OCSController */ private $controller; diff --git a/tests/Core/Controller/PreviewControllerTest.php b/tests/Core/Controller/PreviewControllerTest.php index 65252561796..e1d1529c655 100644 --- a/tests/Core/Controller/PreviewControllerTest.php +++ b/tests/Core/Controller/PreviewControllerTest.php @@ -37,16 +37,16 @@ use OCP\IRequest; class PreviewControllerTest extends \Test\TestCase { - /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */ private $rootFolder; /** @var string */ private $userId; - /** @var IPreview|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IPreview|\PHPUnit\Framework\MockObject\MockObject */ private $previewManager; - /** @var PreviewController|\PHPUnit_Framework_MockObject_MockObject */ + /** @var PreviewController|\PHPUnit\Framework\MockObject\MockObject */ private $controller; protected function setUp(): void { diff --git a/tests/Core/Controller/SvgControllerTest.php b/tests/Core/Controller/SvgControllerTest.php index f6208d6f6c4..c8d0ea5f503 100644 --- a/tests/Core/Controller/SvgControllerTest.php +++ b/tests/Core/Controller/SvgControllerTest.php @@ -47,7 +47,7 @@ class SvgControllerTest extends TestCase { self::TEST_IMAGE_RECT, ]; - /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */ private $appManager; /** diff --git a/tests/Core/Controller/TwoFactorChallengeControllerTest.php b/tests/Core/Controller/TwoFactorChallengeControllerTest.php index a7907343c24..1a2a4d8eaa5 100644 --- a/tests/Core/Controller/TwoFactorChallengeControllerTest.php +++ b/tests/Core/Controller/TwoFactorChallengeControllerTest.php @@ -38,27 +38,26 @@ use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserSession; use OCP\Template; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class TwoFactorChallengeControllerTest extends TestCase { - /** @var IRequest|PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var Manager|PHPUnit_Framework_MockObject_MockObject */ + /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */ private $twoFactorManager; - /** @var IUserSession|PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userSession; - /** @var ISession|PHPUnit_Framework_MockObject_MockObject */ + /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */ private $session; - /** @var IURLGenerator|PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; - /** @var TwoFactorChallengeController|PHPUnit_Framework_MockObject_MockObject */ + /** @var TwoFactorChallengeController|\PHPUnit\Framework\MockObject\MockObject */ private $controller; protected function setUp(): void { diff --git a/tests/Core/Controller/UserControllerTest.php b/tests/Core/Controller/UserControllerTest.php index 78112f09fd6..8b9c11ad4b1 100644 --- a/tests/Core/Controller/UserControllerTest.php +++ b/tests/Core/Controller/UserControllerTest.php @@ -32,7 +32,7 @@ use Test\TestCase; class UserControllerTest extends TestCase { - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; /** @var UserController */ diff --git a/tests/lib/Accounts/HooksTest.php b/tests/lib/Accounts/HooksTest.php index a0360404d72..d24afd475e4 100644 --- a/tests/lib/Accounts/HooksTest.php +++ b/tests/lib/Accounts/HooksTest.php @@ -35,13 +35,13 @@ use Test\TestCase; */ class HooksTest extends TestCase { - /** @var ILogger | \PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var AccountManager | \PHPUnit_Framework_MockObject_MockObject */ + /** @var AccountManager | \PHPUnit\Framework\MockObject\MockObject */ private $accountManager; - /** @var Hooks | \PHPUnit_Framework_MockObject_MockObject */ + /** @var Hooks | \PHPUnit\Framework\MockObject\MockObject */ private $hooks; protected function setUp(): void { diff --git a/tests/lib/Activity/ManagerTest.php b/tests/lib/Activity/ManagerTest.php index f8552e5d45f..2235d63383b 100644 --- a/tests/lib/Activity/ManagerTest.php +++ b/tests/lib/Activity/ManagerTest.php @@ -35,13 +35,13 @@ class ManagerTest extends TestCase { /** @var \OC\Activity\Manager */ private $activityManager; - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ protected $request; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ protected $session; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var IValidator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IValidator|\PHPUnit\Framework\MockObject\MockObject */ protected $validator; protected function setUp(): void { @@ -76,7 +76,7 @@ class ManagerTest extends TestCase { $this->assertNotEmpty($consumers); } - + public function testGetConsumersInvalidConsumer() { $this->expectException(\InvalidArgumentException::class); @@ -165,7 +165,7 @@ class ManagerTest extends TestCase { ->willReturn($mockUser); } - + public function testPublishExceptionNoApp() { $this->expectException(\BadMethodCallException::class); @@ -173,7 +173,7 @@ class ManagerTest extends TestCase { $this->activityManager->publish($event); } - + public function testPublishExceptionNoType() { $this->expectException(\BadMethodCallException::class); @@ -182,7 +182,7 @@ class ManagerTest extends TestCase { $this->activityManager->publish($event); } - + public function testPublishExceptionNoAffectedUser() { $this->expectException(\BadMethodCallException::class); @@ -192,7 +192,7 @@ class ManagerTest extends TestCase { $this->activityManager->publish($event); } - + public function testPublishExceptionNoSubject() { $this->expectException(\BadMethodCallException::class); diff --git a/tests/lib/App/AppStore/Bundles/BundleBase.php b/tests/lib/App/AppStore/Bundles/BundleBase.php index dc7e1920896..a886cf9aec1 100644 --- a/tests/lib/App/AppStore/Bundles/BundleBase.php +++ b/tests/lib/App/AppStore/Bundles/BundleBase.php @@ -26,7 +26,7 @@ use OCP\IL10N; use Test\TestCase; abstract class BundleBase extends TestCase { - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ protected $l10n; /** @var Bundle */ protected $bundle; diff --git a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php index 5964220958c..55534cae699 100644 --- a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php +++ b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php @@ -32,7 +32,7 @@ use OCP\IL10N; use Test\TestCase; class BundleFetcherTest extends TestCase { - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; /** @var BundleFetcher */ private $bundleFetcher; diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php index 50b0fd04dfc..a0a03985c29 100644 --- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php @@ -35,21 +35,20 @@ use OCP\Http\Client\IClientService; use OCP\Http\Client\IResponse; use OCP\IConfig; use OCP\ILogger; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class AppFetcherTest extends TestCase { - /** @var IAppData|PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ protected $appData; - /** @var IClientService|PHPUnit_Framework_MockObject_MockObject */ + /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */ protected $clientService; - /** @var ITimeFactory|PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $timeFactory; - /** @var IConfig|PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var CompareVersion|PHPUnit_Framework_MockObject_MockObject */ + /** @var CompareVersion|\PHPUnit\Framework\MockObject\MockObject */ protected $compareVersion; - /** @var ILogger|PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; /** @var AppFetcher */ protected $fetcher; @@ -1838,7 +1837,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg== protected function setUp(): void { parent::setUp(); - /** @var Factory|PHPUnit_Framework_MockObject_MockObject $factory */ + /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */ $factory = $this->createMock(Factory::class); $this->appData = $this->createMock(AppData::class); $factory->expects($this->once()) diff --git a/tests/lib/App/AppStore/Fetcher/FetcherBase.php b/tests/lib/App/AppStore/Fetcher/FetcherBase.php index 199bcd4b59b..c3d9ec43cc4 100644 --- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php +++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php @@ -37,17 +37,17 @@ use OCP\ILogger; use Test\TestCase; abstract class FetcherBase extends TestCase { - /** @var Factory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Factory|\PHPUnit\Framework\MockObject\MockObject */ protected $appDataFactory; - /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ protected $appData; - /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */ protected $clientService; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $timeFactory; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; /** @var Fetcher */ protected $fetcher; diff --git a/tests/lib/App/DependencyAnalyzerTest.php b/tests/lib/App/DependencyAnalyzerTest.php index a7d42d28baf..1e37948d783 100644 --- a/tests/lib/App/DependencyAnalyzerTest.php +++ b/tests/lib/App/DependencyAnalyzerTest.php @@ -17,7 +17,7 @@ use Test\TestCase; class DependencyAnalyzerTest extends TestCase { - /** @var Platform|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Platform|\PHPUnit\Framework\MockObject\MockObject */ private $platformMock; /** @var IL10N */ diff --git a/tests/lib/AppConfigTest.php b/tests/lib/AppConfigTest.php index 3a4c16b3396..ff23454eb8b 100644 --- a/tests/lib/AppConfigTest.php +++ b/tests/lib/AppConfigTest.php @@ -308,7 +308,7 @@ class AppConfigTest extends TestCase { } public function testGetFilteredValues() { - /** @var \OC\AppConfig|\PHPUnit_Framework_MockObject_MockObject $config */ + /** @var \OC\AppConfig|\PHPUnit\Framework\MockObject\MockObject $config */ $config = $this->getMockBuilder(\OC\AppConfig::class) ->setConstructorArgs([\OC::$server->getDatabaseConnection()]) ->setMethods(['getValues']) diff --git a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php index 4c79adcb4a7..c0aea813243 100644 --- a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php +++ b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php @@ -32,14 +32,14 @@ use OCP\IURLGenerator; class AuthPublicShareControllerTest extends \Test\TestCase { - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */ private $session; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; - /** @var AuthPublicShareController|\PHPUnit_Framework_MockObject_MockObject */ + /** @var AuthPublicShareController|\PHPUnit\Framework\MockObject\MockObject */ private $controller; diff --git a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php index 521c45e47c6..f2a60a574af 100644 --- a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php +++ b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php @@ -29,12 +29,12 @@ use OCP\ISession; class PublicShareControllerTest extends \Test\TestCase { - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */ private $session; - /** @var PublicShareController|\PHPUnit_Framework_MockObject_MockObject */ + /** @var PublicShareController|\PHPUnit\Framework\MockObject\MockObject */ private $controller; diff --git a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php index ba114433a4c..3004123b81b 100644 --- a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php +++ b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php @@ -37,7 +37,7 @@ use OCP\Security\ISecureRandom; */ class DIContainerTest extends \Test\TestCase { - /** @var DIContainer|\PHPUnit_Framework_MockObject_MockObject */ + /** @var DIContainer|\PHPUnit\Framework\MockObject\MockObject */ private $container; protected function setUp(): void { diff --git a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php index 5ca7635614c..0a244a85754 100644 --- a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php +++ b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php @@ -28,7 +28,7 @@ use OCP\AppFramework\Http\FileDisplayResponse; use OCP\Files\File; class FileDisplayResponseTest extends \Test\TestCase { - /** @var File|\PHPUnit_Framework_MockObject_MockObject */ + /** @var File|\PHPUnit\Framework\MockObject\MockObject */ private $file; /** @var FileDisplayResponse */ diff --git a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php index ed6d06d4bf5..7e7140971e4 100644 --- a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php @@ -38,11 +38,11 @@ use OCP\IURLGenerator; class PublicShareMiddlewareTest extends \Test\TestCase { - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */ private $session; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; /** @var PublicShareMiddleware */ diff --git a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php index 55c874ccdb5..f8db85a9358 100644 --- a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php @@ -30,11 +30,11 @@ use OCP\IRequest; use Test\TestCase; class BruteForceMiddlewareTest extends TestCase { - /** @var ControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ControllerMethodReflector|\PHPUnit\Framework\MockObject\MockObject */ private $reflector; - /** @var Throttler|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Throttler|\PHPUnit\Framework\MockObject\MockObject */ private $throttler; - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; /** @var BruteForceMiddleware */ private $bruteForceMiddleware; @@ -73,7 +73,7 @@ class BruteForceMiddlewareTest extends TestCase { ->method('sleepDelay') ->with('127.0.0.1', 'login'); - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); $this->bruteForceMiddleware->beforeController($controller, 'testMethod'); } @@ -94,13 +94,13 @@ class BruteForceMiddlewareTest extends TestCase { ->expects($this->never()) ->method('sleepDelay'); - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); $this->bruteForceMiddleware->beforeController($controller, 'testMethod'); } public function testAfterControllerWithAnnotationAndThrottledRequest() { - /** @var Response|\PHPUnit_Framework_MockObject_MockObject $response */ + /** @var Response|\PHPUnit\Framework\MockObject\MockObject $response */ $response = $this->createMock(Response::class); $this->reflector ->expects($this->once()) @@ -133,13 +133,13 @@ class BruteForceMiddlewareTest extends TestCase { ->method('registerAttempt') ->with('login', '127.0.0.1'); - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); $this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response); } public function testAfterControllerWithAnnotationAndNotThrottledRequest() { - /** @var Response|\PHPUnit_Framework_MockObject_MockObject $response */ + /** @var Response|\PHPUnit\Framework\MockObject\MockObject $response */ $response = $this->createMock(Response::class); $this->reflector ->expects($this->once()) @@ -163,7 +163,7 @@ class BruteForceMiddlewareTest extends TestCase { ->expects($this->never()) ->method('registerAttempt'); - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); $this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response); } @@ -184,9 +184,9 @@ class BruteForceMiddlewareTest extends TestCase { ->expects($this->never()) ->method('sleepDelay'); - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); - /** @var Response|\PHPUnit_Framework_MockObject_MockObject $response */ + /** @var Response|\PHPUnit\Framework\MockObject\MockObject $response */ $response = $this->createMock(Response::class); $this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response); } diff --git a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php index a7bf2b14271..4853b527bf3 100644 --- a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php @@ -27,7 +27,7 @@ class CORSMiddlewareTest extends \Test\TestCase { /** @var ControllerMethodReflector */ private $reflector; - /** @var Session|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Session|\PHPUnit\Framework\MockObject\MockObject */ private $session; /** @var Throttler */ private $throttler; @@ -254,7 +254,7 @@ class CORSMiddlewareTest extends \Test\TestCase { $this->assertEquals($expected, $response); } - + public function testAfterExceptionWithRegularException() { $this->expectException(\Exception::class); $this->expectExceptionMessage('A regular exception'); diff --git a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php index 7a64b6cbcad..3153d7f0b08 100644 --- a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php @@ -36,17 +36,17 @@ use Test\TestCase; class PasswordConfirmationMiddlewareTest extends TestCase { /** @var ControllerMethodReflector */ private $reflector; - /** @var ISession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */ private $session; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userSession; - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */ private $user; /** @var PasswordConfirmationMiddleware */ private $middleware; /** @var Controller */ private $contoller; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; protected function setUp(): void { diff --git a/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php index 3a06531eefd..0d27a9a070f 100644 --- a/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php @@ -34,13 +34,13 @@ use OCP\IUserSession; use Test\TestCase; class RateLimitingMiddlewareTest extends TestCase { - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userSession; - /** @var ControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ControllerMethodReflector|\PHPUnit\Framework\MockObject\MockObject */ private $reflector; - /** @var Limiter|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Limiter|\PHPUnit\Framework\MockObject\MockObject */ private $limiter; /** @var RateLimitingMiddleware */ private $rateLimitingMiddleware; @@ -90,13 +90,13 @@ class RateLimitingMiddlewareTest extends TestCase { ->expects($this->never()) ->method('registerAnonRequest'); - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); $this->rateLimitingMiddleware->beforeController($controller, 'testMethod'); } public function testBeforeControllerForAnon() { - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); $this->request ->expects($this->once()) @@ -137,9 +137,9 @@ class RateLimitingMiddlewareTest extends TestCase { } public function testBeforeControllerForLoggedIn() { - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $this->userSession @@ -185,7 +185,7 @@ class RateLimitingMiddlewareTest extends TestCase { } public function testBeforeControllerAnonWithFallback() { - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); $this->request ->expects($this->once()) @@ -229,19 +229,19 @@ class RateLimitingMiddlewareTest extends TestCase { $this->rateLimitingMiddleware->beforeController($controller, 'testMethod'); } - + public function testAfterExceptionWithOtherException() { $this->expectException(\Exception::class); $this->expectExceptionMessage('My test exception'); - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); $this->rateLimitingMiddleware->afterException($controller, 'testMethod', new \Exception('My test exception')); } public function testAfterExceptionWithJsonBody() { - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); $this->request ->expects($this->once()) @@ -260,7 +260,7 @@ class RateLimitingMiddlewareTest extends TestCase { } public function testAfterExceptionWithHtmlBody() { - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject $controller */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ $controller = $this->createMock(Controller::class); $this->request ->expects($this->once()) diff --git a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php index 6f3c3f32adc..61f5eeb5aea 100644 --- a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php @@ -37,10 +37,10 @@ class SameSiteCookieMiddlewareTest extends TestCase { /** @var SameSiteCookieMiddleware */ private $middleware; - /** @var Request|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Request|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var ControllerMethodReflector|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ControllerMethodReflector|\PHPUnit\Framework\MockObject\MockObject */ private $reflector; protected function setUp(): void { diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index 69f1aa5d547..680c3937836 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -47,27 +47,27 @@ use OCP\Security\ISecureRandom; class SecurityMiddlewareTest extends \Test\TestCase { - /** @var SecurityMiddleware|\PHPUnit_Framework_MockObject_MockObject */ + /** @var SecurityMiddleware|\PHPUnit\Framework\MockObject\MockObject */ private $middleware; - /** @var Controller|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Controller|\PHPUnit\Framework\MockObject\MockObject */ private $controller; /** @var SecurityException */ private $secException; /** @var SecurityException */ private $secAjaxException; - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; /** @var ControllerMethodReflector */ private $reader; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var INavigationManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var INavigationManager|\PHPUnit\Framework\MockObject\MockObject */ private $navigationManager; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; - /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */ private $appManager; - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; protected function setUp(): void { diff --git a/tests/lib/Authentication/LoginCredentials/StoreTest.php b/tests/lib/Authentication/LoginCredentials/StoreTest.php index e7b9cb5996f..ea490b76b8a 100644 --- a/tests/lib/Authentication/LoginCredentials/StoreTest.php +++ b/tests/lib/Authentication/LoginCredentials/StoreTest.php @@ -34,18 +34,17 @@ use OCP\Authentication\Exceptions\CredentialsUnavailableException; use OCP\ILogger; use OCP\ISession; use OCP\Session\Exceptions\SessionNotAvailableException; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class StoreTest extends TestCase { - /** @var ISession|PHPUnit_Framework_MockObject_MockObject */ + /** @var ISession|\PHPUnit\Framework\MockObject\MockObject */ private $session; - /** @var IProvider|PHPUnit_Framework_MockObject_MockObject */ + /** @var IProvider|\PHPUnit\Framework\MockObject\MockObject */ private $tokenProvider; - /** @var ILogger|PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; /** @var Store */ diff --git a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php index 855e90ab6b9..6fdf5b9060e 100644 --- a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php @@ -145,7 +145,7 @@ class DefaultTokenMapperTest extends TestCase { $this->assertEquals($token, $dbToken); } - + public function testGetInvalidToken() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); @@ -175,14 +175,14 @@ class DefaultTokenMapperTest extends TestCase { $this->assertEquals($token, $dbToken); } - + public function testGetTokenByIdNotFound() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); $this->mapper->getTokenById(-1); } - + public function testGetInvalidTokenById() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); @@ -200,7 +200,7 @@ class DefaultTokenMapperTest extends TestCase { } public function testDeleteById() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $qb = $this->dbConnection->getQueryBuilder(); $qb->select('id') diff --git a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php index d95e4c0418d..00b7f0dee03 100644 --- a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php @@ -38,17 +38,17 @@ use Test\TestCase; class DefaultTokenProviderTest extends TestCase { - /** @var DefaultTokenProvider|\PHPUnit_Framework_MockObject_MockObject */ + /** @var DefaultTokenProvider|\PHPUnit\Framework\MockObject\MockObject */ private $tokenProvider; - /** @var DefaultTokenMapper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var DefaultTokenMapper|\PHPUnit\Framework\MockObject\MockObject */ private $mapper; - /** @var ICrypto|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICrypto|\PHPUnit\Framework\MockObject\MockObject */ private $crypto; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; /** @var int */ private $time; @@ -131,7 +131,7 @@ class DefaultTokenProviderTest extends TestCase { $this->tokenProvider->updateTokenActivity($tk); } - + public function testGetTokenByUser() { $this->mapper->expects($this->once()) ->method('getTokenByUser') @@ -159,7 +159,7 @@ class DefaultTokenProviderTest extends TestCase { $this->assertEquals('passme', $actual); } - + public function testGetPasswordPasswordLessToken() { $this->expectException(\OC\Authentication\Exceptions\PasswordlessTokenException::class); @@ -170,7 +170,7 @@ class DefaultTokenProviderTest extends TestCase { $this->tokenProvider->getPassword($tk, $token); } - + public function testGetPasswordDeletesInvalidToken() { $this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class); @@ -222,7 +222,7 @@ class DefaultTokenProviderTest extends TestCase { $this->assertEquals('encryptedpassword', $token->getPassword()); } - + public function testSetPasswordInvalidToken() { $this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class); diff --git a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php index 5ba7fe7c40e..2f2af38851d 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php @@ -172,7 +172,7 @@ class PublicKeyTokenMapperTest extends TestCase { $this->assertEquals($token, $dbToken); } - + public function testGetInvalidToken() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); @@ -204,14 +204,14 @@ class PublicKeyTokenMapperTest extends TestCase { $this->assertEquals($token, $dbToken); } - + public function testGetTokenByIdNotFound() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); $this->mapper->getTokenById(-1); } - + public function testGetInvalidTokenById() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); @@ -229,7 +229,7 @@ class PublicKeyTokenMapperTest extends TestCase { } public function testDeleteById() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $qb = $this->dbConnection->getQueryBuilder(); $qb->select('id') @@ -243,7 +243,7 @@ class PublicKeyTokenMapperTest extends TestCase { } public function testDeleteByIdWrongUser() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $id = 33; diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php index 43ae0e9542c..c16ee7b818e 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php @@ -39,17 +39,17 @@ use Test\TestCase; class PublicKeyTokenProviderTest extends TestCase { - /** @var PublicKeyTokenProvider|\PHPUnit_Framework_MockObject_MockObject */ + /** @var PublicKeyTokenProvider|\PHPUnit\Framework\MockObject\MockObject */ private $tokenProvider; - /** @var PublicKeyTokenMapper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var PublicKeyTokenMapper|\PHPUnit\Framework\MockObject\MockObject */ private $mapper; /** @var ICrypto */ private $crypto; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; /** @var int */ private $time; @@ -145,7 +145,7 @@ class PublicKeyTokenProviderTest extends TestCase { $this->assertSame($password, $this->tokenProvider->getPassword($actual, $token)); } - + public function testGetPasswordPasswordLessToken() { $this->expectException(\OC\Authentication\Exceptions\PasswordlessTokenException::class); @@ -156,7 +156,7 @@ class PublicKeyTokenProviderTest extends TestCase { $this->tokenProvider->getPassword($tk, $token); } - + public function testGetPasswordInvalidToken() { $this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class); @@ -205,7 +205,7 @@ class PublicKeyTokenProviderTest extends TestCase { $this->assertSame($newpass, $this->tokenProvider->getPassword($actual, 'token')); } - + public function testSetPasswordInvalidToken() { $this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class); diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php index b77bddcd5a4..378376a41f9 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php @@ -29,15 +29,14 @@ namespace lib\Authentication\TwoFactorAuth; use OC\Authentication\TwoFactorAuth\ProviderLoader; use OCP\App\IAppManager; use OCP\Authentication\TwoFactorAuth\IProvider; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class ProviderLoaderTest extends TestCase { - /** @var IAppManager|PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */ private $appManager; - /** @var IUser|PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IUser|\PHPUnit\Framework\MockObject\MockObject */ private $user; /** @var ProviderLoader */ @@ -52,7 +51,7 @@ class ProviderLoaderTest extends TestCase { $this->loader = new ProviderLoader($this->appManager); } - + public function testFailHardIfProviderCanNotBeLoaded() { $this->expectException(\Exception::class); $this->expectExceptionMessage('Could not load two-factor auth provider \\OCA\\MyFaulty2faApp\\DoesNotExist'); diff --git a/tests/lib/Avatar/AvatarManagerTest.php b/tests/lib/Avatar/AvatarManagerTest.php index 5351a1069fc..5a061cd10e9 100644 --- a/tests/lib/Avatar/AvatarManagerTest.php +++ b/tests/lib/Avatar/AvatarManagerTest.php @@ -38,17 +38,17 @@ use OCP\IUser; * Class AvatarManagerTest */ class AvatarManagerTest extends \Test\TestCase { - /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; - /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ private $appData; - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var AvatarManager | \PHPUnit_Framework_MockObject_MockObject */ + /** @var AvatarManager | \PHPUnit\Framework\MockObject\MockObject */ private $avatarManager; protected function setUp(): void { @@ -69,7 +69,7 @@ class AvatarManagerTest extends \Test\TestCase { ); } - + public function testGetAvatarInvalidUser() { $this->expectException(\Exception::class); $this->expectExceptionMessage('user does not exist'); diff --git a/tests/lib/Avatar/UserAvatarTest.php b/tests/lib/Avatar/UserAvatarTest.php index e3e0bd1d64e..cf0edad9502 100644 --- a/tests/lib/Avatar/UserAvatarTest.php +++ b/tests/lib/Avatar/UserAvatarTest.php @@ -19,16 +19,16 @@ use OCP\IL10N; use OCP\ILogger; class UserAvatarTest extends \Test\TestCase { - /** @var Folder | \PHPUnit_Framework_MockObject_MockObject */ + /** @var Folder | \PHPUnit\Framework\MockObject\MockObject */ private $folder; /** @var \OC\Avatar\UserAvatar */ private $avatar; - /** @var \OC\User\User | \PHPUnit_Framework_MockObject_MockObject $user */ + /** @var \OC\User\User | \PHPUnit\Framework\MockObject\MockObject $user */ private $user; - /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; protected function setUp(): void { @@ -278,7 +278,7 @@ class UserAvatarTest extends \Test\TestCase { } private function getUserAvatar($user) { - /** @var \OCP\IL10N | \PHPUnit_Framework_MockObject_MockObject $l */ + /** @var \OCP\IL10N | \PHPUnit\Framework\MockObject\MockObject $l */ $l = $this->createMock(IL10N::class); $l->method('t')->willReturnArgument(0); diff --git a/tests/lib/BackgroundJob/JobListTest.php b/tests/lib/BackgroundJob/JobListTest.php index 3013afdfa1d..20ba1e50016 100644 --- a/tests/lib/BackgroundJob/JobListTest.php +++ b/tests/lib/BackgroundJob/JobListTest.php @@ -27,10 +27,10 @@ class JobListTest extends TestCase { /** @var \OCP\IDBConnection */ protected $connection; - /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \OCP\AppFramework\Utility\ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\AppFramework\Utility\ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $timeFactory; protected function setUp(): void { diff --git a/tests/lib/Calendar/ManagerTest.php b/tests/lib/Calendar/ManagerTest.php index 3a2c10b6d62..e686e82adf0 100644 --- a/tests/lib/Calendar/ManagerTest.php +++ b/tests/lib/Calendar/ManagerTest.php @@ -42,7 +42,7 @@ class ManagerTest extends TestCase { * @dataProvider searchProvider */ public function testSearch($search1, $search2, $expected) { - /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar1 */ + /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar1 */ $calendar1 = $this->createMock(ICalendar::class); $calendar1->method('getKey')->willReturn('simple:1'); $calendar1->expects($this->once()) @@ -50,7 +50,7 @@ class ManagerTest extends TestCase { ->with('', [], [], null, null) ->willReturn($search1); - /** @var ICalendar | PHPUnit_Framework_MockObject_MockObject $calendar2 */ + /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar2 */ $calendar2 = $this->createMock(ICalendar::class); $calendar2->method('getKey')->willReturn('simple:2'); $calendar2->expects($this->once()) @@ -69,7 +69,7 @@ class ManagerTest extends TestCase { * @dataProvider searchProvider */ public function testSearchOptions($search1, $search2, $expected) { - /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar1 */ + /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar1 */ $calendar1 = $this->createMock(ICalendar::class); $calendar1->method('getKey')->willReturn('simple:1'); $calendar1->expects($this->once()) @@ -78,7 +78,7 @@ class ManagerTest extends TestCase { ['timerange' => ['start' => null, 'end' => null]], 5, 20) ->willReturn($search1); - /** @var ICalendar | PHPUnit_Framework_MockObject_MockObject $calendar2 */ + /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar2 */ $calendar2 = $this->createMock(ICalendar::class); $calendar2->method('getKey')->willReturn('simple:2'); $calendar2->expects($this->once()) @@ -150,11 +150,11 @@ class ManagerTest extends TestCase { } public function testRegisterUnregister() { - /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar1 */ + /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar1 */ $calendar1 = $this->createMock(ICalendar::class); $calendar1->method('getKey')->willReturn('key1'); - /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar2 */ + /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar2 */ $calendar2 = $this->createMock(ICalendar::class); $calendar2->method('getKey')->willReturn('key2'); @@ -174,11 +174,11 @@ class ManagerTest extends TestCase { } public function testGetCalendars() { - /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar1 */ + /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar1 */ $calendar1 = $this->createMock(ICalendar::class); $calendar1->method('getKey')->willReturn('key1'); - /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar2 */ + /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar2 */ $calendar2 = $this->createMock(ICalendar::class); $calendar2->method('getKey')->willReturn('key2'); @@ -203,7 +203,7 @@ class ManagerTest extends TestCase { } public function testIfEnabledIfSo() { - /** @var ICalendar | \PHPUnit_Framework_MockObject_MockObject $calendar */ + /** @var ICalendar | \PHPUnit\Framework\MockObject\MockObject $calendar */ $calendar = $this->createMock(ICalendar::class); $this->manager->registerCalendar($calendar); diff --git a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php index 3f9e0900d15..2f7cd1061e9 100644 --- a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php @@ -35,13 +35,13 @@ use OCP\Share\IShare; use Test\TestCase; class GroupPluginTest extends TestCase { - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ protected $groupManager; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ protected $session; /** @var ISearchResult */ @@ -56,7 +56,7 @@ class GroupPluginTest extends TestCase { /** @var int */ protected $offset = 0; - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */ protected $user; protected function setUp(): void { @@ -101,7 +101,7 @@ class GroupPluginTest extends TestCase { * @param string $gid * @param null $displayName * @param bool $hide - * @return IGroup|\PHPUnit_Framework_MockObject_MockObject + * @return IGroup|\PHPUnit\Framework\MockObject\MockObject */ protected function getGroupMock($gid, $displayName = null, $hide = false) { $group = $this->createMock(IGroup::class); diff --git a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php index 383dd0c39a2..0a1febe33a5 100644 --- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php @@ -41,17 +41,17 @@ use Test\TestCase; class LookupPluginTest extends TestCase { - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */ protected $clientService; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ protected $userSession; - /** @var ICloudIdManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICloudIdManager|\PHPUnit\Framework\MockObject\MockObject */ protected $cloudIdManager; /** @var LookupPlugin */ protected $plugin; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; protected function setUp(): void { @@ -108,7 +108,7 @@ class LookupPluginTest extends TestCase { $this->clientService->expects($this->never()) ->method('newClient'); - /** @var ISearchResult|\PHPUnit_Framework_MockObject_MockObject $searchResult */ + /** @var ISearchResult|\PHPUnit\Framework\MockObject\MockObject $searchResult */ $searchResult = $this->createMock(ISearchResult::class); $this->plugin->search('foobar', 10, 0, $searchResult); @@ -132,7 +132,7 @@ class LookupPluginTest extends TestCase { $this->clientService->expects($this->never()) ->method('newClient'); - /** @var ISearchResult|\PHPUnit_Framework_MockObject_MockObject $searchResult */ + /** @var ISearchResult|\PHPUnit\Framework\MockObject\MockObject $searchResult */ $searchResult = $this->createMock(ISearchResult::class); $this->plugin->search('foobar', 10, 0, $searchResult); @@ -145,7 +145,7 @@ class LookupPluginTest extends TestCase { public function testSearch(array $searchParams) { $type = new SearchResultType('lookup'); - /** @var ISearchResult|\PHPUnit_Framework_MockObject_MockObject $searchResult */ + /** @var ISearchResult|\PHPUnit\Framework\MockObject\MockObject $searchResult */ $searchResult = $this->createMock(ISearchResult::class); $searchResult->expects($this->once()) ->method('addResultSet') @@ -207,7 +207,7 @@ class LookupPluginTest extends TestCase { public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnabled, $LookupEnabled) { $type = new SearchResultType('lookup'); - /** @var ISearchResult|\PHPUnit_Framework_MockObject_MockObject $searchResult */ + /** @var ISearchResult|\PHPUnit\Framework\MockObject\MockObject $searchResult */ $searchResult = $this->createMock(ISearchResult::class); $this->config->expects($this->once()) @@ -269,7 +269,7 @@ class LookupPluginTest extends TestCase { ->with('files_sharing', 'lookupServerEnabled', 'yes') ->willReturn('no'); - /** @var ISearchResult|\PHPUnit_Framework_MockObject_MockObject $searchResult */ + /** @var ISearchResult|\PHPUnit\Framework\MockObject\MockObject $searchResult */ $searchResult = $this->createMock(ISearchResult::class); $searchResult->expects($this->never()) ->method('addResultSet'); diff --git a/tests/lib/Collaboration/Collaborators/MailPluginTest.php b/tests/lib/Collaboration/Collaborators/MailPluginTest.php index 6e859b55358..54dec490a2d 100644 --- a/tests/lib/Collaboration/Collaborators/MailPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/MailPluginTest.php @@ -37,13 +37,13 @@ use OCP\Share\IShare; use Test\TestCase; class MailPluginTest extends TestCase { - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ protected $contactsManager; - /** @var ICloudIdManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICloudIdManager|\PHPUnit\Framework\MockObject\MockObject */ protected $cloudIdManager; /** @var MailPlugin */ @@ -52,10 +52,10 @@ class MailPluginTest extends TestCase { /** @var SearchResult */ protected $searchResult; - /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ protected $groupManager; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ protected $userSession; protected function setUp(): void { @@ -544,7 +544,7 @@ class MailPluginTest extends TestCase { $this->instantiatePlugin(); - /** @var \OCP\IUser | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IUser | \PHPUnit\Framework\MockObject\MockObject */ $currentUser = $this->createMock('\OCP\IUser'); $currentUser->expects($this->any()) diff --git a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php index 531a8447bd2..c03f993508b 100644 --- a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php +++ b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php @@ -38,16 +38,16 @@ use Test\TestCase; class RemotePluginTest extends TestCase { - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ protected $userManager; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ protected $contactsManager; - /** @var ICloudIdManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICloudIdManager|\PHPUnit\Framework\MockObject\MockObject */ protected $cloudIdManager; /** @var RemotePlugin */ diff --git a/tests/lib/Collaboration/Collaborators/SearchResultTest.php b/tests/lib/Collaboration/Collaborators/SearchResultTest.php index 84d270de547..98e454f2834 100644 --- a/tests/lib/Collaboration/Collaborators/SearchResultTest.php +++ b/tests/lib/Collaboration/Collaborators/SearchResultTest.php @@ -31,7 +31,7 @@ use OCP\IContainer; use Test\TestCase; class SearchResultTest extends TestCase { - /** @var IContainer|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IContainer|\PHPUnit\Framework\MockObject\MockObject */ protected $container; /** @var ISearch */ protected $search; diff --git a/tests/lib/Collaboration/Collaborators/SearchTest.php b/tests/lib/Collaboration/Collaborators/SearchTest.php index ab731c05c21..0aebef72de0 100644 --- a/tests/lib/Collaboration/Collaborators/SearchTest.php +++ b/tests/lib/Collaboration/Collaborators/SearchTest.php @@ -33,7 +33,7 @@ use OCP\Share\IShare; use Test\TestCase; class SearchTest extends TestCase { - /** @var IContainer|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IContainer|\PHPUnit\Framework\MockObject\MockObject */ protected $container; /** @var ISearch */ protected $search; diff --git a/tests/lib/Collaboration/Collaborators/UserPluginTest.php b/tests/lib/Collaboration/Collaborators/UserPluginTest.php index 8ca612f6069..6c4ffcc52d8 100644 --- a/tests/lib/Collaboration/Collaborators/UserPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/UserPluginTest.php @@ -36,16 +36,16 @@ use OCP\Share\IShare; use Test\TestCase; class UserPluginTest extends TestCase { - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ protected $userManager; - /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ protected $groupManager; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ protected $session; /** @var UserPlugin */ @@ -60,7 +60,7 @@ class UserPluginTest extends TestCase { /** @var int */ protected $offset = 0; - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */ protected $user; protected function setUp(): void { diff --git a/tests/lib/Command/Integrity/SignAppTest.php b/tests/lib/Command/Integrity/SignAppTest.php index 6802542914f..fefed296a0c 100644 --- a/tests/lib/Command/Integrity/SignAppTest.php +++ b/tests/lib/Command/Integrity/SignAppTest.php @@ -30,13 +30,13 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class SignAppTest extends TestCase { - /** @var Checker|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Checker|\PHPUnit\Framework\MockObject\MockObject */ private $checker; /** @var SignApp */ private $signApp; - /** @var FileAccessHelper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var FileAccessHelper|\PHPUnit\Framework\MockObject\MockObject */ private $fileAccessHelper; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; protected function setUp(): void { diff --git a/tests/lib/Command/Integrity/SignCoreTest.php b/tests/lib/Command/Integrity/SignCoreTest.php index 27e4f66c242..3b7fe7f3a8b 100644 --- a/tests/lib/Command/Integrity/SignCoreTest.php +++ b/tests/lib/Command/Integrity/SignCoreTest.php @@ -29,9 +29,9 @@ use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; class SignCoreTest extends TestCase { - /** @var Checker|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Checker|\PHPUnit\Framework\MockObject\MockObject */ private $checker; - /** @var FileAccessHelper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var FileAccessHelper|\PHPUnit\Framework\MockObject\MockObject */ private $fileAccessHelper; /** @var SignCore */ private $signCore; diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php index e2bf6180709..def00fd0dcc 100644 --- a/tests/lib/Comments/ManagerTest.php +++ b/tests/lib/Comments/ManagerTest.php @@ -67,7 +67,7 @@ class ManagerTest extends TestCase { return $factory->getManager(); } - + public function testGetCommentNotFound() { $this->expectException(\OCP\Comments\NotFoundException::class); @@ -75,7 +75,7 @@ class ManagerTest extends TestCase { $manager->get('22'); } - + public function testGetCommentNotFoundInvalidInput() { $this->expectException(\InvalidArgumentException::class); @@ -125,7 +125,7 @@ class ManagerTest extends TestCase { $this->assertEquals($comment->getLatestChildDateTime(), $latestChildDT); } - + public function testGetTreeNotFound() { $this->expectException(\OCP\Comments\NotFoundException::class); @@ -133,7 +133,7 @@ class ManagerTest extends TestCase { $manager->getTree('22'); } - + public function testGetTreeNotFoundInvalidIpnut() { $this->expectException(\InvalidArgumentException::class); @@ -335,7 +335,7 @@ class ManagerTest extends TestCase { $this->addDatabaseEntry(0, 0, null, null, $fileIds[$i]); } $this->addDatabaseEntry(0, 0, (new \DateTime())->modify('-2 days'), null, $fileIds[0]); - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user->expects($this->any()) ->method('getUID') @@ -437,7 +437,7 @@ class ManagerTest extends TestCase { $this->assertSame($comment->getObjectId(), $objectId); } - + public function testDelete() { $this->expectException(\OCP\Comments\NotFoundException::class); @@ -498,7 +498,7 @@ class ManagerTest extends TestCase { $this->assertSame($comment->getMessage(), $loadedComment->getMessage()); } - + public function testSaveUpdateException() { $this->expectException(\OCP\Comments\NotFoundException::class); @@ -517,7 +517,7 @@ class ManagerTest extends TestCase { $manager->save($comment); } - + public function testSaveIncomplete() { $this->expectException(\UnexpectedValueException::class); @@ -675,7 +675,7 @@ class ManagerTest extends TestCase { } public function testSetMarkRead() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user->expects($this->any()) ->method('getUID') @@ -692,7 +692,7 @@ class ManagerTest extends TestCase { } public function testSetMarkReadUpdate() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user->expects($this->any()) ->method('getUID') @@ -712,7 +712,7 @@ class ManagerTest extends TestCase { } public function testReadMarkDeleteUser() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user->expects($this->any()) ->method('getUID') @@ -730,7 +730,7 @@ class ManagerTest extends TestCase { } public function testReadMarkDeleteObject() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user->expects($this->any()) ->method('getUID') @@ -800,7 +800,7 @@ class ManagerTest extends TestCase { $this->assertSame('SOMBRERO', $manager->resolveDisplayName('galaxy', 'sombrero')); } - + public function testRegisterResolverDuplicate() { $this->expectException(\OutOfBoundsException::class); @@ -813,7 +813,7 @@ class ManagerTest extends TestCase { $manager->registerDisplayNameResolver('planet', $planetClosure); } - + public function testRegisterResolverInvalidType() { $this->expectException(\InvalidArgumentException::class); @@ -825,7 +825,7 @@ class ManagerTest extends TestCase { $manager->registerDisplayNameResolver(1337, $planetClosure); } - + public function testResolveDisplayNameUnregisteredType() { $this->expectException(\OutOfBoundsException::class); @@ -850,7 +850,7 @@ class ManagerTest extends TestCase { $this->assertTrue(is_string($manager->resolveDisplayName('planet', 'neptune'))); } - + public function testResolveDisplayNameInvalidType() { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php index ee053ce40e5..f20df96f7a2 100644 --- a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php +++ b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php @@ -33,18 +33,17 @@ use OCP\Contacts\ContactsMenu\IProvider; use OCP\ILogger; use OCP\IServerContainer; use OCP\IUser; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class ActionProviderStoreTest extends TestCase { - /** @var IServerContainer|PHPUnit_Framework_MockObject_MockObject */ + /** @var IServerContainer|\PHPUnit\Framework\MockObject\MockObject */ private $serverContainer; - /** @var IAppManager|PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */ private $appManager; - /** @var ILogger|PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; /** @var ActionProviderStore */ @@ -114,7 +113,7 @@ class ActionProviderStoreTest extends TestCase { $this->assertInstanceOf(EMailProvider::class, $providers[0]); } - + public function testGetProvidersWithQueryException() { $this->expectException(\Exception::class); diff --git a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php index 245c89c3228..acfe83ac558 100644 --- a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php +++ b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php @@ -31,19 +31,18 @@ use OCP\IConfig; use OCP\IGroupManager; use OCP\IUser; use OCP\IUserManager; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class ContactsStoreTest extends TestCase { /** @var ContactsStore */ private $contactsStore; - /** @var IManager|PHPUnit_Framework_MockObject_MockObject */ + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ private $contactsManager; - /** @var IUserManager|PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; - /** @var IGroupManager|PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ private $groupManager; - /** @var IConfig|PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; protected function setUp(): void { @@ -57,7 +56,7 @@ class ContactsStoreTest extends TestCase { } public function testGetContactsWithoutFilter() { - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $this->contactsManager->expects($this->once()) ->method('search') @@ -87,7 +86,7 @@ class ContactsStoreTest extends TestCase { } public function testGetContactsHidesOwnEntry() { - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $this->contactsManager->expects($this->once()) ->method('search') @@ -114,7 +113,7 @@ class ContactsStoreTest extends TestCase { } public function testGetContactsWithoutBinaryImage() { - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $this->contactsManager->expects($this->once()) ->method('search') @@ -143,7 +142,7 @@ class ContactsStoreTest extends TestCase { } public function testGetContactsWithoutAvatarURI() { - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $this->contactsManager->expects($this->once()) ->method('search') @@ -196,7 +195,7 @@ class ContactsStoreTest extends TestCase { ->with($this->equalTo('core'), $this->equalTo('shareapi_exclude_groups_list'), $this->equalTo('')) ->willReturn('["group1", "group5", "group6"]'); - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $currentUser */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $currentUser */ $currentUser = $this->createMock(IUser::class); $currentUser->expects($this->once()) ->method('getUID') @@ -246,7 +245,7 @@ class ContactsStoreTest extends TestCase { ->with($this->equalTo('core'), $this->equalTo('shareapi_only_share_with_group_members'), $this->equalTo('no')) ->willReturn('yes'); - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $currentUser */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $currentUser */ $currentUser = $this->createMock(IUser::class); $currentUser->expects($this->once()) ->method('getUID') @@ -332,7 +331,7 @@ class ContactsStoreTest extends TestCase { ->with($this->equalTo('core'), $this->equalTo('shareapi_only_share_with_group_members'), $this->equalTo('no')) ->willReturn('no'); - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $currentUser */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $currentUser */ $currentUser = $this->createMock(IUser::class); $currentUser->expects($this->once()) ->method('getUID') @@ -405,7 +404,7 @@ class ContactsStoreTest extends TestCase { ->with($this->equalTo('core'), $this->equalTo('shareapi_allow_share_dialog_user_enumeration'), $this->equalTo('yes')) ->willReturn('no'); - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $this->contactsManager->expects($this->any()) ->method('search') @@ -489,7 +488,7 @@ class ContactsStoreTest extends TestCase { ->with($this->equalTo('core'), $this->equalTo('shareapi_allow_share_dialog_user_enumeration'), $this->equalTo('yes')) ->willReturn('yes'); - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $this->contactsManager->expects($this->once()) ->method('search') @@ -520,7 +519,7 @@ class ContactsStoreTest extends TestCase { } public function testFindOneEMail() { - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $this->contactsManager->expects($this->once()) ->method('search') @@ -551,7 +550,7 @@ class ContactsStoreTest extends TestCase { } public function testFindOneNotSupportedType() { - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $entry = $this->contactsStore->findOne($user, 42, 'darren@roner.au'); @@ -560,7 +559,7 @@ class ContactsStoreTest extends TestCase { } public function testFindOneNoMatches() { - /** @var IUser|PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $this->contactsManager->expects($this->once()) ->method('search') diff --git a/tests/lib/Contacts/ContactsMenu/ManagerTest.php b/tests/lib/Contacts/ContactsMenu/ManagerTest.php index 561051974b7..4cfbd9c7c90 100644 --- a/tests/lib/Contacts/ContactsMenu/ManagerTest.php +++ b/tests/lib/Contacts/ContactsMenu/ManagerTest.php @@ -32,21 +32,20 @@ use OCP\Contacts\ContactsMenu\IEntry; use OCP\Contacts\ContactsMenu\IProvider; use OCP\IConfig; use OCP\IUser; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class ManagerTest extends TestCase { - /** @var ContactsStore|PHPUnit_Framework_MockObject_MockObject */ + /** @var ContactsStore|\PHPUnit\Framework\MockObject\MockObject */ private $contactsStore; - /** @var IAppManager|PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */ private $appManager; - /** @var IConfig|PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var ActionProviderStore|PHPUnit_Framework_MockObject_MockObject */ + /** @var ActionProviderStore|\PHPUnit\Framework\MockObject\MockObject */ private $actionProviderStore; /** @var Manager */ diff --git a/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php b/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php index 157f8574fa4..c0052469aba 100644 --- a/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php +++ b/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php @@ -29,15 +29,14 @@ use OCP\Contacts\ContactsMenu\IActionFactory; use OCP\Contacts\ContactsMenu\IEntry; use OCP\Contacts\ContactsMenu\ILinkAction; use OCP\IURLGenerator; -use PHPUnit_Framework_MockObject_MockObject; use Test\TestCase; class EMailproviderTest extends TestCase { - /** @var IActionFactory|PHPUnit_Framework_MockObject_MockObject */ + /** @var IActionFactory|\PHPUnit\Framework\MockObject\MockObject */ private $actionFactory; - /** @var IURLGenerator|PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; /** @var EMailProvider */ diff --git a/tests/lib/ContactsManagerTest.php b/tests/lib/ContactsManagerTest.php index 4699d894e4b..841c510941f 100644 --- a/tests/lib/ContactsManagerTest.php +++ b/tests/lib/ContactsManagerTest.php @@ -63,7 +63,7 @@ class ContactsManagerTest extends \Test\TestCase { * @dataProvider searchProvider */ public function testSearch($search1, $search2, $expectedResult) { - /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */ $addressbook1 = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() ->getMock(); @@ -94,10 +94,10 @@ class ContactsManagerTest extends \Test\TestCase { $result = $this->cm->search(''); $this->assertEquals($expectedResult, $result); } - + public function testDeleteHavePermission() { - /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() ->getMock(); @@ -117,7 +117,7 @@ class ContactsManagerTest extends \Test\TestCase { } public function testDeleteNoPermission() { - /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() ->getMock(); @@ -135,7 +135,7 @@ class ContactsManagerTest extends \Test\TestCase { } public function testDeleteNoAddressbook() { - /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() ->getMock(); @@ -149,7 +149,7 @@ class ContactsManagerTest extends \Test\TestCase { } public function testCreateOrUpdateHavePermission() { - /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() ->getMock(); @@ -168,7 +168,7 @@ class ContactsManagerTest extends \Test\TestCase { } public function testCreateOrUpdateNoPermission() { - /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() ->getMock(); @@ -186,7 +186,7 @@ class ContactsManagerTest extends \Test\TestCase { } public function testCreateOrUpdateNOAdressbook() { - /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() ->getMock(); @@ -205,7 +205,7 @@ class ContactsManagerTest extends \Test\TestCase { } public function testIsEnabledIfSo() { - /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() ->getMock(); @@ -217,7 +217,7 @@ class ContactsManagerTest extends \Test\TestCase { public function testAddressBookEnumeration() { // create mock for the addressbook - /** @var \PHPUnit_Framework_MockObject_MockObject|IAddressBook $addressbook */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBook $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBook') ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/DB/MDB2SchemaReaderTest.php b/tests/lib/DB/MDB2SchemaReaderTest.php index 2f987adb290..c57b0f22b6f 100644 --- a/tests/lib/DB/MDB2SchemaReaderTest.php +++ b/tests/lib/DB/MDB2SchemaReaderTest.php @@ -32,7 +32,7 @@ class MDB2SchemaReaderTest extends TestCase { * @return IConfig */ protected function getConfig() { - /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject $config */ + /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject $config */ $config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/DB/MigrationsTest.php b/tests/lib/DB/MigrationsTest.php index c4e9b1857fb..9b6dec006d6 100644 --- a/tests/lib/DB/MigrationsTest.php +++ b/tests/lib/DB/MigrationsTest.php @@ -31,9 +31,9 @@ use OCP\Migration\IMigrationStep; */ class MigrationsTest extends \Test\TestCase { - /** @var MigrationService | \PHPUnit_Framework_MockObject_MockObject */ + /** @var MigrationService | \PHPUnit\Framework\MockObject\MockObject */ private $migrationService; - /** @var \PHPUnit_Framework_MockObject_MockObject | IDBConnection $db */ + /** @var \PHPUnit\Framework\MockObject\MockObject | IDBConnection $db */ private $db; protected function setUp(): void { diff --git a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php index 7b1fee38db3..faf06360e17 100644 --- a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php @@ -43,10 +43,10 @@ class QueryBuilderTest extends \Test\TestCase { /** @var IDBConnection */ protected $connection; - /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; protected function setUp(): void { diff --git a/tests/lib/Encryption/DecryptAllTest.php b/tests/lib/Encryption/DecryptAllTest.php index 3a16327ac18..a8c6f6caebb 100644 --- a/tests/lib/Encryption/DecryptAllTest.php +++ b/tests/lib/Encryption/DecryptAllTest.php @@ -44,22 +44,22 @@ use Test\TestCase; */ class DecryptAllTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject | IUserManager */ + /** @var \PHPUnit\Framework\MockObject\MockObject | IUserManager */ protected $userManager; - /** @var \PHPUnit_Framework_MockObject_MockObject | Manager */ + /** @var \PHPUnit\Framework\MockObject\MockObject | Manager */ protected $encryptionManager; - /** @var \PHPUnit_Framework_MockObject_MockObject | View */ + /** @var \PHPUnit\Framework\MockObject\MockObject | View */ protected $view; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Input\InputInterface */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Input\InputInterface */ protected $inputInterface; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Symfony\Component\Console\Output\OutputInterface */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \Symfony\Component\Console\Output\OutputInterface */ protected $outputInterface; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\UserInterface */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\UserInterface */ protected $userInterface; /** @var DecryptAll */ @@ -112,7 +112,7 @@ class DecryptAllTest extends TestCase { } else { $this->userManager->expects($this->never())->method('userExists'); } - /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject | $instance */ + /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject | $instance */ $instance = $this->getMockBuilder('OC\Encryption\DecryptAll') ->setConstructorArgs( [ @@ -198,7 +198,7 @@ class DecryptAllTest extends TestCase { */ public function testDecryptAllUsersFiles($user) { - /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject | $instance */ + /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject | $instance */ $instance = $this->getMockBuilder('OC\Encryption\DecryptAll') ->setConstructorArgs( [ @@ -243,7 +243,7 @@ class DecryptAllTest extends TestCase { } public function testDecryptUsersFiles() { - /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject $instance */ + /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder('OC\Encryption\DecryptAll') ->setConstructorArgs( [ @@ -313,7 +313,7 @@ class DecryptAllTest extends TestCase { public function testDecryptFile($isEncrypted) { $path = 'test.txt'; - /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject $instance */ + /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder('OC\Encryption\DecryptAll') ->setConstructorArgs( [ @@ -353,7 +353,7 @@ class DecryptAllTest extends TestCase { public function testDecryptFileFailure() { $path = 'test.txt'; - /** @var DecryptAll | \PHPUnit_Framework_MockObject_MockObject $instance */ + /** @var DecryptAll | \PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder('OC\Encryption\DecryptAll') ->setConstructorArgs( [ diff --git a/tests/lib/Encryption/EncryptionWrapperTest.php b/tests/lib/Encryption/EncryptionWrapperTest.php index 06d9116255f..20bcb6e7ca1 100644 --- a/tests/lib/Encryption/EncryptionWrapperTest.php +++ b/tests/lib/Encryption/EncryptionWrapperTest.php @@ -33,13 +33,13 @@ class EncryptionWrapperTest extends TestCase { /** @var EncryptionWrapper */ private $instance; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OCP\ILogger */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\ILogger */ private $logger; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Encryption\Manager */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Encryption\Manager */ private $manager; - /** @var \PHPUnit_Framework_MockObject_MockObject | \OC\Memcache\ArrayCache */ + /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Memcache\ArrayCache */ private $arrayCache; protected function setUp(): void { diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php index fd33077c78b..bd9bbdecdf1 100644 --- a/tests/lib/Encryption/Keys/StorageTest.php +++ b/tests/lib/Encryption/Keys/StorageTest.php @@ -33,13 +33,13 @@ class StorageTest extends TestCase { /** @var Storage */ protected $storage; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $util; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $view; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $config; protected function setUp(): void { diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php index 47dd7fd01fb..81ac263cb93 100644 --- a/tests/lib/Encryption/ManagerTest.php +++ b/tests/lib/Encryption/ManagerTest.php @@ -17,22 +17,22 @@ class ManagerTest extends TestCase { /** @var Manager */ private $manager; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; - /** @var View|\PHPUnit_Framework_MockObject_MockObject */ + /** @var View|\PHPUnit\Framework\MockObject\MockObject */ private $view; - /** @var Util|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Util|\PHPUnit\Framework\MockObject\MockObject */ private $util; - - /** @var ArrayCache|\PHPUnit_Framework_MockObject_MockObject */ + + /** @var ArrayCache|\PHPUnit\Framework\MockObject\MockObject */ private $arrayCache; protected function setUp(): void { @@ -100,7 +100,7 @@ class ManagerTest extends TestCase { $this->assertEmpty($this->manager->getEncryptionModules()); } - + public function testGetEncryptionModuleUnknown() { $this->expectException(\OC\Encryption\Exceptions\ModuleDoesNotExistsException::class); $this->expectExceptionMessage('Module with ID: unknown does not exist.'); diff --git a/tests/lib/Encryption/UpdateTest.php b/tests/lib/Encryption/UpdateTest.php index d7aa24d1f67..08fb08bf797 100644 --- a/tests/lib/Encryption/UpdateTest.php +++ b/tests/lib/Encryption/UpdateTest.php @@ -34,22 +34,22 @@ class UpdateTest extends TestCase { /** @var string */ private $uid; - /** @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject */ private $view; - /** @var \OC\Encryption\Util | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\Encryption\Util | \PHPUnit\Framework\MockObject\MockObject */ private $util; - /** @var \OC\Files\Mount\Manager | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\Files\Mount\Manager | \PHPUnit\Framework\MockObject\MockObject */ private $mountManager; - /** @var \OC\Encryption\Manager | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\Encryption\Manager | \PHPUnit\Framework\MockObject\MockObject */ private $encryptionManager; - /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject */ private $encryptionModule; - /** @var \OC\Encryption\File | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\Encryption\File | \PHPUnit\Framework\MockObject\MockObject */ private $fileHelper; protected function setUp(): void { @@ -212,7 +212,7 @@ class UpdateTest extends TestCase { * create mock of the update method * * @param array$methods methods which should be set - * @return \OC\Encryption\Update | \PHPUnit_Framework_MockObject_MockObject + * @return \OC\Encryption\Update | \PHPUnit\Framework\MockObject\MockObject */ protected function getUpdateMock($methods) { return $this->getMockBuilder('\OC\Encryption\Update') diff --git a/tests/lib/Encryption/UtilTest.php b/tests/lib/Encryption/UtilTest.php index e1d898f5a86..84d81dd1cbb 100644 --- a/tests/lib/Encryption/UtilTest.php +++ b/tests/lib/Encryption/UtilTest.php @@ -17,16 +17,16 @@ class UtilTest extends TestCase { */ protected $headerSize = 8192; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $view; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $userManager; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $groupManager; - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ private $config; /** @var \OC\Encryption\Util */ @@ -94,7 +94,7 @@ class UtilTest extends TestCase { ]; } - + public function testCreateHeaderFailed() { $this->expectException(\OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException::class); diff --git a/tests/lib/Files/AppData/AppDataTest.php b/tests/lib/Files/AppData/AppDataTest.php index a03be9e45e9..d06d7a9a91e 100644 --- a/tests/lib/Files/AppData/AppDataTest.php +++ b/tests/lib/Files/AppData/AppDataTest.php @@ -33,10 +33,10 @@ use OCP\Files\Node; use OCP\Files\SimpleFS\ISimpleFolder; class AppDataTest extends \Test\TestCase { - /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */ private $rootFolder; - /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */ private $systemConfig; /** @var IAppData */ diff --git a/tests/lib/Files/AppData/FactoryTest.php b/tests/lib/Files/AppData/FactoryTest.php index fec464d6e3a..8161bc515ec 100644 --- a/tests/lib/Files/AppData/FactoryTest.php +++ b/tests/lib/Files/AppData/FactoryTest.php @@ -28,10 +28,10 @@ use OC\SystemConfig; use OCP\Files\IRootFolder; class FactoryTest extends \Test\TestCase { - /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */ private $rootFolder; - /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */ private $systemConfig; /** @var Factory */ diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php index 97663c16c02..a6d429798e8 100644 --- a/tests/lib/Files/Cache/CacheTest.php +++ b/tests/lib/Files/Cache/CacheTest.php @@ -532,7 +532,7 @@ class CacheTest extends \Test\TestCase { $folderWith0308 = "\x53\x63\x68\x6f\xcc\x88\x6e"; /** - * @var \OC\Files\Cache\Cache | \PHPUnit_Framework_MockObject_MockObject $cacheMock + * @var \OC\Files\Cache\Cache | \PHPUnit\Framework\MockObject\MockObject $cacheMock */ $cacheMock = $this->getMockBuilder(Cache::class) ->setMethods(['normalize']) diff --git a/tests/lib/Files/Cache/QuerySearchHelperTest.php b/tests/lib/Files/Cache/QuerySearchHelperTest.php index 464561681d0..8f97e0158fe 100644 --- a/tests/lib/Files/Cache/QuerySearchHelperTest.php +++ b/tests/lib/Files/Cache/QuerySearchHelperTest.php @@ -39,7 +39,7 @@ class QuerySearchHelperTest extends TestCase { /** @var IQueryBuilder */ private $builder; - /** @var IMimeTypeLoader|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IMimeTypeLoader|\PHPUnit\Framework\MockObject\MockObject */ private $mimetypeLoader; /** @var QuerySearchHelper */ diff --git a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php index 278872b8728..ea414679888 100644 --- a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php +++ b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php @@ -12,13 +12,13 @@ class ObjectHomeMountProviderTest extends \Test\TestCase { /** @var ObjectHomeMountProvider */ protected $provider; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */ protected $user; - /** @var IStorageFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IStorageFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $loader; protected function setUp(): void { @@ -216,7 +216,7 @@ class ObjectHomeMountProviderTest extends \Test\TestCase { $this->user->method('getUID') ->willReturn('uid'); $this->loader->expects($this->never())->method($this->anything()); - + $mount = $this->provider->getHomeMountForUser($this->user, $this->loader); $this->assertInstanceOf('OC\Files\Mount\MountPoint', $mount); } diff --git a/tests/lib/Files/Node/FileTest.php b/tests/lib/Files/Node/FileTest.php index 3fa988c89d8..6b5aaabbc28 100644 --- a/tests/lib/Files/Node/FileTest.php +++ b/tests/lib/Files/Node/FileTest.php @@ -33,7 +33,7 @@ class FileTest extends NodeTest { } public function testGetContent() { - /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */ + /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder('\OC\Files\Node\Root') ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->getMock(); @@ -59,11 +59,11 @@ class FileTest extends NodeTest { $this->assertEquals('bar', $node->getContent()); } - + public function testGetContentNotPermitted() { $this->expectException(\OCP\Files\NotPermittedException::class); - /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */ + /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder('\OC\Files\Node\Root') ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->getMock(); @@ -82,7 +82,7 @@ class FileTest extends NodeTest { } public function testPutContent() { - /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */ + /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder('\OC\Files\Node\Root') ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->getMock(); @@ -105,11 +105,11 @@ class FileTest extends NodeTest { $node->putContent('bar'); } - + public function testPutContentNotPermitted() { $this->expectException(\OCP\Files\NotPermittedException::class); - /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */ + /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder('\OC\Files\Node\Root') ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->getMock(); @@ -124,7 +124,7 @@ class FileTest extends NodeTest { } public function testGetMimeType() { - /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */ + /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder('\OC\Files\Node\Root') ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->getMock(); @@ -213,7 +213,7 @@ class FileTest extends NodeTest { $this->assertEquals(2, $hooksCalled); } - + public function testFOpenReadNotPermitted() { $this->expectException(\OCP\Files\NotPermittedException::class); @@ -238,7 +238,7 @@ class FileTest extends NodeTest { $node->fopen('r'); } - + public function testFOpenReadWriteNoReadPermissions() { $this->expectException(\OCP\Files\NotPermittedException::class); @@ -263,7 +263,7 @@ class FileTest extends NodeTest { $node->fopen('w'); } - + public function testFOpenReadWriteNoWritePermissions() { $this->expectException(\OCP\Files\NotPermittedException::class); diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php index d2bbf65965a..1ba052b8de4 100644 --- a/tests/lib/Files/Node/FolderTest.php +++ b/tests/lib/Files/Node/FolderTest.php @@ -50,7 +50,7 @@ class FolderTest extends NodeTest { public function testGetDirectoryContent() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -82,7 +82,7 @@ class FolderTest extends NodeTest { public function testGet() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -103,7 +103,7 @@ class FolderTest extends NodeTest { public function testNodeExists() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -127,7 +127,7 @@ class FolderTest extends NodeTest { public function testNodeExistsNotExists() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -149,7 +149,7 @@ class FolderTest extends NodeTest { public function testNewFolder() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -175,13 +175,13 @@ class FolderTest extends NodeTest { $this->assertEquals($child, $result); } - + public function testNewFolderNotPermitted() { $this->expectException(\OCP\Files\NotPermittedException::class); $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -203,7 +203,7 @@ class FolderTest extends NodeTest { public function testNewFile() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -229,13 +229,13 @@ class FolderTest extends NodeTest { $this->assertEquals($child, $result); } - + public function testNewFileNotPermitted() { $this->expectException(\OCP\Files\NotPermittedException::class); $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -257,7 +257,7 @@ class FolderTest extends NodeTest { public function testGetFreeSpace() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -279,7 +279,7 @@ class FolderTest extends NodeTest { public function testSearch() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -330,7 +330,7 @@ class FolderTest extends NodeTest { public function testSearchInRoot() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -340,7 +340,7 @@ class FolderTest extends NodeTest { $root->expects($this->any()) ->method('getUser') ->willReturn($this->user); - /** @var \PHPUnit_Framework_MockObject_MockObject|Storage $storage */ + /** @var \PHPUnit\Framework\MockObject\MockObject|Storage $storage */ $storage = $this->createMock(Storage::class); $storage->method('getId')->willReturn(''); $cache = $this->getMockBuilder(Cache::class)->setConstructorArgs([$storage])->getMock(); @@ -383,7 +383,7 @@ class FolderTest extends NodeTest { public function testSearchInStorageRoot() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -434,7 +434,7 @@ class FolderTest extends NodeTest { public function testSearchSubStorages() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -517,7 +517,7 @@ class FolderTest extends NodeTest { public function testGetById() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -571,7 +571,7 @@ class FolderTest extends NodeTest { public function testGetByIdMountRoot() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -620,7 +620,7 @@ class FolderTest extends NodeTest { public function testGetByIdOutsideFolder() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -673,7 +673,7 @@ class FolderTest extends NodeTest { public function testGetByIdMultipleStorages() { $manager = $this->createMock(Manager::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -756,7 +756,7 @@ class FolderTest extends NodeTest { $manager = $this->createMock(Manager::class); $folderPath = '/bar/foo'; /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); $root = $this->getMockBuilder(Root::class) @@ -783,15 +783,15 @@ class FolderTest extends NodeTest { $manager = $this->createMock(Manager::class); $folderPath = '/bar/foo'; /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); - /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\Node\Root $root */ + /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\Node\Root $root */ $root = $this->getMockBuilder(Root::class) ->setMethods(['getUser', 'getMountsIn', 'getMount']) ->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->getMock(); - /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */ + /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */ $folderInfo = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor()->getMock(); @@ -847,15 +847,15 @@ class FolderTest extends NodeTest { $manager = $this->createMock(Manager::class); $folderPath = '/bar/foo'; /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); - /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\Node\Root $root */ + /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\Node\Root $root */ $root = $this->getMockBuilder(Root::class) ->setMethods(['getUser', 'getMountsIn', 'getMount']) ->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->getMock(); - /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */ + /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */ $folderInfo = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor()->getMock(); @@ -909,15 +909,15 @@ class FolderTest extends NodeTest { $manager = $this->createMock(Manager::class); $folderPath = '/bar/foo'; /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); - /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\Node\Root $root */ + /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\Node\Root $root */ $root = $this->getMockBuilder(Root::class) ->setMethods(['getUser', 'getMountsIn', 'getMount']) ->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->getMock(); - /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */ + /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */ $folderInfo = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Files/Node/NodeTest.php b/tests/lib/Files/Node/NodeTest.php index 86643617959..6ea5a6d7ffa 100644 --- a/tests/lib/Files/Node/NodeTest.php +++ b/tests/lib/Files/Node/NodeTest.php @@ -29,15 +29,15 @@ abstract class NodeTest extends \Test\TestCase { protected $user; /** @var \OC\Files\Mount\Manager */ protected $manager; - /** @var \OC\Files\View|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\Files\View|\PHPUnit\Framework\MockObject\MockObject */ protected $view; - /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject */ protected $root; - /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit\Framework\MockObject\MockObject */ protected $userMountCache; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ protected $userManager; protected function setUp(): void { @@ -177,7 +177,7 @@ abstract class NodeTest extends \Test\TestCase { $this->assertEquals(2, $hooksRun); } - + public function testDeleteNotPermitted() { $this->expectException(\OCP\Files\NotPermittedException::class); @@ -307,7 +307,7 @@ abstract class NodeTest extends \Test\TestCase { ->method('getUser') ->willReturn($this->user); /** - * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage + * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder('\OC\Files\Storage\Storage') ->disableOriginalConstructor() @@ -337,7 +337,7 @@ abstract class NodeTest extends \Test\TestCase { ->method('getUser') ->willReturn($this->user); /** - * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage + * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder('\OC\Files\Storage\Storage') ->disableOriginalConstructor() @@ -434,7 +434,7 @@ abstract class NodeTest extends \Test\TestCase { $this->assertEquals(2, $hooksRun); } - + public function testTouchNotPermitted() { $this->expectException(\OCP\Files\NotPermittedException::class); @@ -451,7 +451,7 @@ abstract class NodeTest extends \Test\TestCase { $node->touch(100); } - + public function testInvalidPath() { $this->expectException(\OCP\Files\InvalidPathException::class); @@ -485,12 +485,12 @@ abstract class NodeTest extends \Test\TestCase { $this->assertEquals(3, $target->getId()); } - + public function testCopyNotPermitted() { $this->expectException(\OCP\Files\NotPermittedException::class); /** - * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage + * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->createMock('\OC\Files\Storage\Storage'); @@ -516,7 +516,7 @@ abstract class NodeTest extends \Test\TestCase { $node->copy('/bar/asd'); } - + public function testCopyNoParent() { $this->expectException(\OCP\Files\NotFoundException::class); @@ -533,7 +533,7 @@ abstract class NodeTest extends \Test\TestCase { $node->copy('/bar/asd/foo'); } - + public function testCopyParentIsFile() { $this->expectException(\OCP\Files\NotPermittedException::class); @@ -590,7 +590,7 @@ abstract class NodeTest extends \Test\TestCase { * @param string $postHookName */ public function testMoveCopyHooks($operationMethod, $viewMethod, $preHookName, $postHookName) { - /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject $root */ + /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder('\OC\Files\Node\Root') ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->setMethods(['get']) @@ -606,7 +606,7 @@ abstract class NodeTest extends \Test\TestCase { ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL, 'fileid' => 1])); /** - * @var \OC\Files\Node\File|\PHPUnit_Framework_MockObject_MockObject $node + * @var \OC\Files\Node\File|\PHPUnit\Framework\MockObject\MockObject $node */ $node = $this->createTestNode($root, $this->view, '/bar/foo'); $parentNode = new \OC\Files\Node\Folder($root, $this->view, '/bar'); @@ -656,7 +656,7 @@ abstract class NodeTest extends \Test\TestCase { $this->assertEquals(4, $hooksRun); } - + public function testMoveNotPermitted() { $this->expectException(\OCP\Files\NotPermittedException::class); @@ -678,12 +678,12 @@ abstract class NodeTest extends \Test\TestCase { $node->move('/bar/asd'); } - + public function testMoveNoParent() { $this->expectException(\OCP\Files\NotFoundException::class); /** - * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage + * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->createMock('\OC\Files\Storage\Storage'); @@ -700,7 +700,7 @@ abstract class NodeTest extends \Test\TestCase { $node->move('/bar/asd'); } - + public function testMoveParentIsFile() { $this->expectException(\OCP\Files\NotPermittedException::class); @@ -718,7 +718,7 @@ abstract class NodeTest extends \Test\TestCase { $node->move('/bar/asd'); } - + public function testMoveFailed() { $this->expectException(\OCP\Files\NotPermittedException::class); @@ -741,7 +741,7 @@ abstract class NodeTest extends \Test\TestCase { $node->move('/bar/asd'); } - + public function testCopyFailed() { $this->expectException(\OCP\Files\NotPermittedException::class); diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php index 6c006d1cf62..13fdcb65902 100644 --- a/tests/lib/Files/Node/RootTest.php +++ b/tests/lib/Files/Node/RootTest.php @@ -27,11 +27,11 @@ class RootTest extends \Test\TestCase { private $user; /** @var \OC\Files\Mount\Manager */ private $manager; - /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit\Framework\MockObject\MockObject */ private $userMountCache; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; protected function setUp(): void { @@ -60,7 +60,7 @@ class RootTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->getMockBuilder(View::class) ->disableOriginalConstructor() @@ -85,7 +85,7 @@ class RootTest extends \Test\TestCase { $this->assertInstanceOf('\OC\Files\Node\File', $node); } - + public function testGetNotFound() { $this->expectException(\OCP\Files\NotFoundException::class); @@ -96,7 +96,7 @@ class RootTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->getMockBuilder(View::class) ->disableOriginalConstructor() @@ -119,12 +119,12 @@ class RootTest extends \Test\TestCase { $root->get('/bar/foo'); } - + public function testGetInvalidPath() { $this->expectException(\OCP\Files\NotPermittedException::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->getMockBuilder(View::class) ->disableOriginalConstructor() @@ -141,12 +141,12 @@ class RootTest extends \Test\TestCase { $root->get('/../foo'); } - + public function testGetNoStorages() { $this->expectException(\OCP\Files\NotFoundException::class); /** - * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view + * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->getMockBuilder(View::class) ->disableOriginalConstructor() @@ -182,7 +182,7 @@ class RootTest extends \Test\TestCase { ->method('get') ->with('MyUserId') ->willReturn($user); - /** @var CappedMemoryCache|\PHPUnit_Framework_MockObject_MockObject $cappedMemoryCache */ + /** @var CappedMemoryCache|\PHPUnit\Framework\MockObject\MockObject $cappedMemoryCache */ $cappedMemoryCache = $this->createMock(CappedMemoryCache::class); $cappedMemoryCache ->expects($this->once()) @@ -199,7 +199,7 @@ class RootTest extends \Test\TestCase { $this->assertEquals($folder, $root->getUserFolder('MyUserId')); } - + public function testGetUserFolderWithNoUserObj() { $this->expectException(\OC\User\NoUserException::class); $this->expectExceptionMessage('Backends provided no user object'); diff --git a/tests/lib/Files/SimpleFS/SimpleFileTest.php b/tests/lib/Files/SimpleFS/SimpleFileTest.php index b9a47c4d6e2..def570edf99 100644 --- a/tests/lib/Files/SimpleFS/SimpleFileTest.php +++ b/tests/lib/Files/SimpleFS/SimpleFileTest.php @@ -29,7 +29,7 @@ use OCP\Files\Folder; use OCP\Files\NotFoundException; class SimpleFileTest extends \Test\TestCase { - /** @var File|\PHPUnit_Framework_MockObject_MockObject */ + /** @var File|\PHPUnit\Framework\MockObject\MockObject */ private $file; /** @var SimpleFile */ diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php index 73de60e3652..eccec7c28d5 100644 --- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php @@ -37,72 +37,72 @@ class EncryptionTest extends Storage { private $sourceStorage; /** - * @var \OC\Files\Storage\Wrapper\Encryption | \PHPUnit_Framework_MockObject_MockObject + * @var \OC\Files\Storage\Wrapper\Encryption | \PHPUnit\Framework\MockObject\MockObject */ protected $instance; /** - * @var \OC\Encryption\Keys\Storage | \PHPUnit_Framework_MockObject_MockObject + * @var \OC\Encryption\Keys\Storage | \PHPUnit\Framework\MockObject\MockObject */ private $keyStore; /** - * @var \OC\Encryption\Util | \PHPUnit_Framework_MockObject_MockObject + * @var \OC\Encryption\Util | \PHPUnit\Framework\MockObject\MockObject */ private $util; /** - * @var \OC\Encryption\Manager | \PHPUnit_Framework_MockObject_MockObject + * @var \OC\Encryption\Manager | \PHPUnit\Framework\MockObject\MockObject */ private $encryptionManager; /** - * @var \OCP\Encryption\IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject + * @var \OCP\Encryption\IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject */ private $encryptionModule; /** - * @var \OC\Encryption\Update | \PHPUnit_Framework_MockObject_MockObject + * @var \OC\Encryption\Update | \PHPUnit\Framework\MockObject\MockObject */ private $update; /** - * @var \OC\Files\Cache\Cache | \PHPUnit_Framework_MockObject_MockObject + * @var \OC\Files\Cache\Cache | \PHPUnit\Framework\MockObject\MockObject */ private $cache; /** - * @var \OC\Log | \PHPUnit_Framework_MockObject_MockObject + * @var \OC\Log | \PHPUnit\Framework\MockObject\MockObject */ private $logger; /** - * @var \OC\Encryption\File | \PHPUnit_Framework_MockObject_MockObject + * @var \OC\Encryption\File | \PHPUnit\Framework\MockObject\MockObject */ private $file; /** - * @var \OC\Files\Mount\MountPoint | \PHPUnit_Framework_MockObject_MockObject + * @var \OC\Files\Mount\MountPoint | \PHPUnit\Framework\MockObject\MockObject */ private $mount; /** - * @var \OC\Files\Mount\Manager | \PHPUnit_Framework_MockObject_MockObject + * @var \OC\Files\Mount\Manager | \PHPUnit\Framework\MockObject\MockObject */ private $mountManager; /** - * @var \OC\Group\Manager | \PHPUnit_Framework_MockObject_MockObject + * @var \OC\Group\Manager | \PHPUnit\Framework\MockObject\MockObject */ private $groupManager; /** - * @var \OCP\IConfig | \PHPUnit_Framework_MockObject_MockObject + * @var \OCP\IConfig | \PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var \OC\Memcache\ArrayCache | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\Memcache\ArrayCache | \PHPUnit\Framework\MockObject\MockObject */ private $arrayCache; @@ -212,7 +212,7 @@ class EncryptionTest extends Storage { } /** - * @return \PHPUnit_Framework_MockObject_MockObject + * @return \PHPUnit\Framework\MockObject\MockObject */ protected function buildMockModule() { $this->encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule') @@ -848,7 +848,7 @@ class EncryptionTest extends Storage { $mountPoint = '/mountPoint'; - /** @var \OC\Files\Storage\Wrapper\Encryption |\PHPUnit_Framework_MockObject_MockObject $instance */ + /** @var \OC\Files\Storage\Wrapper\Encryption |\PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder('\OC\Files\Storage\Wrapper\Encryption') ->setConstructorArgs( [ @@ -994,7 +994,7 @@ class EncryptionTest extends Storage { ->getMock(); if ($encryptionModule === true) { - /** @var IEncryptionModule|\PHPUnit_Framework_MockObject_MockObject $encryptionModule */ + /** @var IEncryptionModule|\PHPUnit\Framework\MockObject\MockObject $encryptionModule */ $encryptionModule = $this->createMock(IEncryptionModule::class); } diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php index bedce1b6f6d..08264f07fcf 100644 --- a/tests/lib/Files/Stream/EncryptionTest.php +++ b/tests/lib/Files/Stream/EncryptionTest.php @@ -12,7 +12,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; class EncryptionTest extends \Test\TestCase { - /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject */ private $encryptionModule; /** @@ -325,7 +325,7 @@ class EncryptionTest extends \Test\TestCase { } /** - * @return \PHPUnit_Framework_MockObject_MockObject + * @return \PHPUnit\Framework\MockObject\MockObject */ protected function buildMockModule() { $encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule') diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index fad2217bfdb..139516ba374 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -1160,7 +1160,7 @@ class ViewTest extends \Test\TestCase { private function doTestCopyRenameFail($operation) { $storage1 = new Temporary([]); - /** @var \PHPUnit_Framework_MockObject_MockObject|Temporary $storage2 */ + /** @var \PHPUnit\Framework\MockObject\MockObject|Temporary $storage2 */ $storage2 = $this->getMockBuilder(TemporaryNoCross::class) ->setConstructorArgs([[]]) ->setMethods(['fopen']) @@ -1206,7 +1206,7 @@ class ViewTest extends \Test\TestCase { } public function testDeleteFailKeepCache() { - /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */ + /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder(Temporary::class) ->setConstructorArgs([[]]) ->setMethods(['unlink']) @@ -1585,7 +1585,7 @@ class ViewTest extends \Test\TestCase { ->getMock(); } - /** @var IMountProvider|\PHPUnit_Framework_MockObject_MockObject $mountProvider */ + /** @var IMountProvider|\PHPUnit\Framework\MockObject\MockObject $mountProvider */ $mountProvider = $this->createMock(IMountProvider::class); $mountProvider->expects($this->any()) ->method('getMountsForUser') @@ -1822,7 +1822,7 @@ class ViewTest extends \Test\TestCase { ) { $view = new View('/' . $this->user . '/files/'); - /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */ + /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder(Temporary::class) ->setMethods([$operation]) ->getMock(); @@ -1872,7 +1872,7 @@ class ViewTest extends \Test\TestCase { $view = new View('/' . $this->user . '/files/'); $path = 'test_file_put_contents.txt'; - /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */ + /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder(Temporary::class) ->setMethods(['fopen']) ->getMock(); @@ -1911,7 +1911,7 @@ class ViewTest extends \Test\TestCase { $view = new View('/' . $this->user . '/files/'); $path = 'test_file_put_contents.txt'; - /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */ + /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder(Temporary::class) ->setMethods(['fopen']) ->getMock(); @@ -1966,7 +1966,7 @@ class ViewTest extends \Test\TestCase { } $view = new View('/' . $this->user . '/files/'); - /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */ + /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder(Temporary::class) ->setMethods([$operation]) ->getMock(); @@ -2048,7 +2048,7 @@ class ViewTest extends \Test\TestCase { ) { $view = new View('/' . $this->user . '/files/'); - /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */ + /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder(Temporary::class) ->setMethods([$operation]) ->getMock(); @@ -2087,7 +2087,7 @@ class ViewTest extends \Test\TestCase { public function testLockFileRename($operation, $expectedLockTypeSourceDuring) { $view = new View('/' . $this->user . '/files/'); - /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */ + /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder(Temporary::class) ->setMethods([$operation, 'getMetaData', 'filemtime']) ->getMock(); @@ -2153,7 +2153,7 @@ class ViewTest extends \Test\TestCase { $view = new View('/' . $this->user . '/files/'); - /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */ + /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder(Temporary::class) ->setMethods(['copy']) ->getMock(); @@ -2272,11 +2272,11 @@ class ViewTest extends \Test\TestCase { public function testLockFileRenameCrossStorage($viewOperation, $storageOperation, $expectedLockTypeSourceDuring) { $view = new View('/' . $this->user . '/files/'); - /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */ + /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->getMockBuilder(Temporary::class) ->setMethods([$storageOperation]) ->getMock(); - /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage2 */ + /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage2 */ $storage2 = $this->getMockBuilder(Temporary::class) ->setMethods([$storageOperation, 'getMetaData', 'filemtime']) ->getMock(); @@ -2471,7 +2471,7 @@ class ViewTest extends \Test\TestCase { $mountPoint = '/' . $this->user . '/files/mount/'; // Mock the mount point - /** @var TestMoveableMountPoint|\PHPUnit_Framework_MockObject_MockObject $mount */ + /** @var TestMoveableMountPoint|\PHPUnit\Framework\MockObject\MockObject $mount */ $mount = $this->createMock(TestMoveableMountPoint::class); $mount->expects($this->once()) ->method('getMountPoint') diff --git a/tests/lib/GlobalScale/ConfigTest.php b/tests/lib/GlobalScale/ConfigTest.php index 2f2e1c21855..5689fd0fb1f 100644 --- a/tests/lib/GlobalScale/ConfigTest.php +++ b/tests/lib/GlobalScale/ConfigTest.php @@ -27,7 +27,7 @@ use Test\TestCase; class ConfigTest extends TestCase { - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; protected function setUp(): void { @@ -38,7 +38,7 @@ class ConfigTest extends TestCase { /** * @param array $mockMethods - * @return Config|\PHPUnit_Framework_MockObject_MockObject + * @return Config|\PHPUnit\Framework\MockObject\MockObject */ public function getInstance($mockMethods = []) { if (!empty($mockMethods)) { diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php index ff1d6e641ea..8b6be03615a 100644 --- a/tests/lib/Group/ManagerTest.php +++ b/tests/lib/Group/ManagerTest.php @@ -61,7 +61,7 @@ class ManagerTest extends TestCase { /** * @param null|int $implementedActions - * @return \PHPUnit_Framework_MockObject_MockObject + * @return \PHPUnit\Framework\MockObject\MockObject */ private function getTestBackend($implementedActions = null) { if ($implementedActions === null) { @@ -99,7 +99,7 @@ class ManagerTest extends TestCase { public function testGet() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->any()) @@ -123,7 +123,7 @@ class ManagerTest extends TestCase { public function testGetNotExists() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->once()) @@ -151,7 +151,7 @@ class ManagerTest extends TestCase { public function testGetMultipleBackends() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend1 + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend1 */ $backend1 = $this->getTestBackend(); $backend1->expects($this->any()) @@ -160,7 +160,7 @@ class ManagerTest extends TestCase { ->willReturn(false); /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend2 + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend2 */ $backend2 = $this->getTestBackend(); $backend2->expects($this->any()) @@ -178,7 +178,7 @@ class ManagerTest extends TestCase { } public function testCreate() { - /**@var \PHPUnit_Framework_MockObject_MockObject|\OC\Group\Backend $backend */ + /**@var \PHPUnit\Framework\MockObject\MockObject|\OC\Group\Backend $backend */ $backendGroupCreated = false; $backend = $this->getTestBackend(); $backend->expects($this->any()) @@ -202,7 +202,7 @@ class ManagerTest extends TestCase { } public function testCreateFailure() { - /**@var \PHPUnit_Framework_MockObject_MockObject|\OC\Group\Backend $backend */ + /**@var \PHPUnit\Framework\MockObject\MockObject|\OC\Group\Backend $backend */ $backendGroupCreated = false; $backend = $this->getTestBackend( GroupInterface::ADD_TO_GROUP | @@ -231,7 +231,7 @@ class ManagerTest extends TestCase { } public function testCreateExists() { - /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Group\Backend $backend */ + /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->any()) ->method('groupExists') @@ -249,7 +249,7 @@ class ManagerTest extends TestCase { public function testSearch() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->once()) @@ -272,7 +272,7 @@ class ManagerTest extends TestCase { public function testSearchMultipleBackends() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend1 + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend1 */ $backend1 = $this->getTestBackend(); $backend1->expects($this->once()) @@ -284,7 +284,7 @@ class ManagerTest extends TestCase { ->willReturn(true); /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend2 + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend2 */ $backend2 = $this->getTestBackend(); $backend2->expects($this->once()) @@ -309,7 +309,7 @@ class ManagerTest extends TestCase { public function testSearchMultipleBackendsLimitAndOffset() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend1 + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend1 */ $backend1 = $this->getTestBackend(); $backend1->expects($this->once()) @@ -321,7 +321,7 @@ class ManagerTest extends TestCase { ->willReturn(true); /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend2 + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend2 */ $backend2 = $this->getTestBackend(); $backend2->expects($this->once()) @@ -345,7 +345,7 @@ class ManagerTest extends TestCase { } public function testSearchResultExistsButGroupDoesNot() { - /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Group\Backend $backend */ + /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Group\Backend $backend */ $backend = $this->createMock(Database::class); $backend->expects($this->once()) ->method('getGroups') @@ -368,7 +368,7 @@ class ManagerTest extends TestCase { public function testGetUserGroups() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->once()) @@ -391,7 +391,7 @@ class ManagerTest extends TestCase { public function testGetUserGroupIds() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->method('getUserGroups') @@ -400,7 +400,7 @@ class ManagerTest extends TestCase { $manager = new \OC\Group\Manager($this->userManager, $this->dispatcher, $this->logger); $manager->addBackend($backend); - /** @var \OC\User\User|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var \OC\User\User|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $groups = $manager->getUserGroupIds($user); @@ -413,7 +413,7 @@ class ManagerTest extends TestCase { public function testGetUserGroupsWithDeletedGroup() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->createMock(Database::class); $backend->expects($this->once()) @@ -428,7 +428,7 @@ class ManagerTest extends TestCase { $manager = new \OC\Group\Manager($this->userManager, $this->dispatcher, $this->logger); $manager->addBackend($backend); - /** @var \OC\User\User|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var \OC\User\User|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user->expects($this->atLeastOnce()) ->method('getUID') @@ -440,7 +440,7 @@ class ManagerTest extends TestCase { public function testInGroup() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->once()) @@ -459,7 +459,7 @@ class ManagerTest extends TestCase { public function testIsAdmin() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->once()) @@ -478,7 +478,7 @@ class ManagerTest extends TestCase { public function testNotAdmin() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->once()) @@ -497,7 +497,7 @@ class ManagerTest extends TestCase { public function testGetUserGroupsMultipleBackends() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend1 + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend1 */ $backend1 = $this->getTestBackend(); $backend1->expects($this->once()) @@ -509,7 +509,7 @@ class ManagerTest extends TestCase { ->willReturn(true); /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend2 + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend2 */ $backend2 = $this->getTestBackend(); $backend2->expects($this->once()) @@ -534,7 +534,7 @@ class ManagerTest extends TestCase { public function testDisplayNamesInGroupWithOneUserBackend() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->exactly(1)) @@ -592,7 +592,7 @@ class ManagerTest extends TestCase { public function testDisplayNamesInGroupWithOneUserBackendWithLimitSpecified() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->exactly(1)) @@ -653,7 +653,7 @@ class ManagerTest extends TestCase { public function testDisplayNamesInGroupWithOneUserBackendWithLimitAndOffsetSpecified() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->exactly(1)) @@ -717,7 +717,7 @@ class ManagerTest extends TestCase { public function testDisplayNamesInGroupWithOneUserBackendAndSearchEmpty() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->exactly(1)) @@ -756,7 +756,7 @@ class ManagerTest extends TestCase { public function testDisplayNamesInGroupWithOneUserBackendAndSearchEmptyAndLimitSpecified() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->exactly(1)) @@ -795,7 +795,7 @@ class ManagerTest extends TestCase { public function testDisplayNamesInGroupWithOneUserBackendAndSearchEmptyAndLimitAndOffsetSpecified() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->exactly(1)) @@ -834,7 +834,7 @@ class ManagerTest extends TestCase { public function testGetUserGroupsWithAddUser() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $expectedGroups = []; @@ -871,7 +871,7 @@ class ManagerTest extends TestCase { public function testGetUserGroupsWithRemoveUser() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $expectedGroups = ['group1']; @@ -914,7 +914,7 @@ class ManagerTest extends TestCase { public function testGetUserIdGroups() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend(); $backend->expects($this->any()) @@ -931,7 +931,7 @@ class ManagerTest extends TestCase { public function testGroupDisplayName() { /** - * @var \PHPUnit_Framework_MockObject_MockObject | \OC\Group\Backend $backend + * @var \PHPUnit\Framework\MockObject\MockObject | \OC\Group\Backend $backend */ $backend = $this->getTestBackend( GroupInterface::ADD_TO_GROUP | diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php index 9c3c40c267e..97f74cc2f8f 100644 --- a/tests/lib/InstallerTest.php +++ b/tests/lib/InstallerTest.php @@ -26,15 +26,15 @@ use OCP\ITempManager; class InstallerTest extends TestCase { private static $appid = 'testapp'; private $appstore; - /** @var AppFetcher|\PHPUnit_Framework_MockObject_MockObject */ + /** @var AppFetcher|\PHPUnit\Framework\MockObject\MockObject */ private $appFetcher; - /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */ private $clientService; - /** @var ITempManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITempManager|\PHPUnit\Framework\MockObject\MockObject */ private $tempManager; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; protected function setUp(): void { diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index f1cd7467169..c79f192a7fb 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -34,21 +34,21 @@ use phpseclib\File\X509; use Test\TestCase; class CheckerTest extends TestCase { - /** @var EnvironmentHelper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var EnvironmentHelper|\PHPUnit\Framework\MockObject\MockObject */ private $environmentHelper; - /** @var AppLocator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var AppLocator|\PHPUnit\Framework\MockObject\MockObject */ private $appLocator; /** @var Checker */ private $checker; - /** @var FileAccessHelper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var FileAccessHelper|\PHPUnit\Framework\MockObject\MockObject */ private $fileAccessHelper; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ private $cacheFactory; - /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */ private $appManager; - /** @var \OC\Files\Type\Detection|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\Files\Type\Detection|\PHPUnit\Framework\MockObject\MockObject */ private $mimeTypeDetector; protected function setUp(): void { @@ -82,7 +82,7 @@ class CheckerTest extends TestCase { ); } - + public function testWriteAppSignatureOfNotExistingApp() { $this->expectException(\Exception::class); $this->expectExceptionMessage('Exception message'); @@ -107,7 +107,7 @@ class CheckerTest extends TestCase { $this->checker->writeAppSignature('NotExistingApp', $x509, $rsa); } - + public function testWriteAppSignatureWrongPermissions() { $this->expectException(\Exception::class); $this->expectExceptionMessageRegExp('/[a-zA-Z\\/_-]+ is not writable/'); @@ -480,7 +480,7 @@ class CheckerTest extends TestCase { $this->assertSame([], $this->checker->verifyAppSignature('SomeApp')); } - + public function testWriteCoreSignatureWithException() { $this->expectException(\Exception::class); $this->expectExceptionMessage('Exception message'); @@ -504,7 +504,7 @@ class CheckerTest extends TestCase { $this->checker->writeCoreSignature($x509, $rsa, __DIR__); } - + public function testWriteCoreSignatureWrongPermissions() { $this->expectException(\Exception::class); $this->expectExceptionMessageRegExp('/[a-zA-Z\\/_-]+ is not writable/'); @@ -996,7 +996,7 @@ class CheckerTest extends TestCase { ->method('getServerRoot') ->willReturn(\OC::$SERVERROOT . '/tests/data/integritycheck/mimetypeListModified'); $signatureDataFile = '{ - "hashes": { + "hashes": { "mimetypelist.js": "dc48de7ad4baa030c5e563350c9a80b274bad783f6f5adbf1595ecef6c6a32e52890a24cb26cddb0aa20193ba52c001150c68d8bfb567f0aed566f4029a190a3" }, "signature": "dtNDyufRB1jOG3e\/\/Ng6O3ZPnX5wgt3rrD9SpRQ66cpWlixwvGaI6knH85MkWm3q1c+hTYBipJ\/o+nJxHWoxydMXm+F6mC5MvXWfESB\/ag4fvKe0fg25yKstzlrpIyWwcnmOhLE\/sd7D8LZOQXk72PXsIJw4vX2YPyf3peHLevlUkVhB+mfYGDQJfrtPHjJII0Do+TV2MA0qm42q7SO\/zf7Ly24nZP3AoY5bYDMewlrczS2xz9tMN2ikZZcDgHvmC2W4RkaFP9E8ZeAZphKVjyQn6HdSu7EDlJgJ1YtoqTetFzNy\/q7+ODiJDB0KUzKocEDcXF2n2cTKXKCrklB6tEhEnjADhhQNxQouq2soc0ouIujifyH2zBL0sawNxGje5wpuchhCPnWcvQnSJbK1oXnv\/0wSGsp0iSslvx9NXAZ+nQbJnIuodLBl7XuTxxPVa8jDwFdJ7mLrs79ZfN2Op4qF10PiFRoz5VztJm4KWcaWnm\/Xqxke\/6yxY+gU2c6aH\/plwzkcxhdDJjNI\/d+G+b6NSadfcrduO+gTeHK\/go68mx0k1XxCln4Qu31nPmJZcboTvAtHvHXoeqZVAzMpT+jrq+vZ3oVAvFfNpvH4CA3eZebfkV13wV4RaSETyz5QNbnBL24C26aAhkzdShKHJc4NSNV9XdFqN74XEzSZGoc=", diff --git a/tests/lib/L10N/FactoryTest.php b/tests/lib/L10N/FactoryTest.php index fb5286ebe65..db4dc4db865 100644 --- a/tests/lib/L10N/FactoryTest.php +++ b/tests/lib/L10N/FactoryTest.php @@ -24,13 +24,13 @@ use Test\TestCase; */ class FactoryTest extends TestCase { - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ protected $request; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ protected $userSession; /** @var string */ @@ -57,7 +57,7 @@ class FactoryTest extends TestCase { /** * @param array $methods * @param bool $mockRequestGetHeaderMethod - * @return Factory|\PHPUnit_Framework_MockObject_MockObject + * @return Factory|\PHPUnit\Framework\MockObject\MockObject */ protected function getFactory(array $methods = [], $mockRequestGetHeaderMethod = false) { if ($mockRequestGetHeaderMethod) { diff --git a/tests/lib/L10N/LanguageIteratorTest.php b/tests/lib/L10N/LanguageIteratorTest.php index 9223db716f4..bbbbb145c75 100644 --- a/tests/lib/L10N/LanguageIteratorTest.php +++ b/tests/lib/L10N/LanguageIteratorTest.php @@ -29,9 +29,9 @@ use OCP\IUser; use Test\TestCase; class LanguageIteratorTest extends TestCase { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */ protected $user; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; /** @var LanguageIterator */ protected $iterator; diff --git a/tests/lib/Log/LogFactoryTest.php b/tests/lib/Log/LogFactoryTest.php index e4725a3bc1a..91ff79369bf 100644 --- a/tests/lib/Log/LogFactoryTest.php +++ b/tests/lib/Log/LogFactoryTest.php @@ -39,13 +39,13 @@ use Test\TestCase; * @package Test\Log */ class LogFactoryTest extends TestCase { - /** @var IServerContainer|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IServerContainer|\PHPUnit\Framework\MockObject\MockObject */ protected $c; /** @var LogFactory */ protected $factory; - /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $systemConfig; protected function setUp(): void { diff --git a/tests/lib/LoggerTest.php b/tests/lib/LoggerTest.php index 5ed7b4c9b38..9e0e3c4b66e 100644 --- a/tests/lib/LoggerTest.php +++ b/tests/lib/LoggerTest.php @@ -14,10 +14,10 @@ use OCP\Log\IWriter; class LoggerTest extends TestCase implements IWriter { - /** @var \OC\SystemConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\SystemConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var \OCP\Support\CrashReport\IRegistry|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\Support\CrashReport\IRegistry|\PHPUnit\Framework\MockObject\MockObject */ private $registry; /** @var \OCP\ILogger */ diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php index a900b1fe47d..74f44051988 100644 --- a/tests/lib/Mail/EMailTemplateTest.php +++ b/tests/lib/Mail/EMailTemplateTest.php @@ -31,11 +31,11 @@ use OCP\L10N\IFactory; use Test\TestCase; class EMailTemplateTest extends TestCase { - /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject */ private $defaults; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; - /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; /** @var EMailTemplate */ private $emailTemplate; diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php index 9e7f6a4134c..3ec2e96dfab 100644 --- a/tests/lib/Mail/MailerTest.php +++ b/tests/lib/Mail/MailerTest.php @@ -26,15 +26,15 @@ use Test\TestCase; use Swift_SwiftException; class MailerTest extends TestCase { - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject */ private $defaults; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; /** @var Mailer */ private $mailer; diff --git a/tests/lib/Mail/MessageTest.php b/tests/lib/Mail/MessageTest.php index 2172a327234..b0641ae332f 100644 --- a/tests/lib/Mail/MessageTest.php +++ b/tests/lib/Mail/MessageTest.php @@ -208,10 +208,10 @@ class MessageTest extends TestCase { } public function testPlainTextRenderOption() { - /** @var \PHPUnit_Framework_MockObject_MockObject|Swift_Message $swiftMessage */ + /** @var \PHPUnit\Framework\MockObject\MockObject|Swift_Message $swiftMessage */ $swiftMessage = $this->getMockBuilder('\Swift_Message') ->disableOriginalConstructor()->getMock(); - /** @var \PHPUnit_Framework_MockObject_MockObject|IEMailTemplate $template */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IEMailTemplate $template */ $template = $this->getMockBuilder('\OCP\Mail\IEMailTemplate') ->disableOriginalConstructor()->getMock(); @@ -231,10 +231,10 @@ class MessageTest extends TestCase { } public function testBothRenderingOptions() { - /** @var \PHPUnit_Framework_MockObject_MockObject|Swift_Message $swiftMessage */ + /** @var \PHPUnit\Framework\MockObject\MockObject|Swift_Message $swiftMessage */ $swiftMessage = $this->getMockBuilder('\Swift_Message') ->disableOriginalConstructor()->getMock(); - /** @var \PHPUnit_Framework_MockObject_MockObject|IEMailTemplate $template */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IEMailTemplate $template */ $template = $this->getMockBuilder('\OCP\Mail\IEMailTemplate') ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Migration/BackgroundRepairTest.php b/tests/lib/Migration/BackgroundRepairTest.php index 8c467d58269..4e95915e624 100644 --- a/tests/lib/Migration/BackgroundRepairTest.php +++ b/tests/lib/Migration/BackgroundRepairTest.php @@ -56,16 +56,16 @@ class TestRepairStep implements IRepairStep { class BackgroundRepairTest extends TestCase { - /** @var \OC\BackgroundJob\JobList|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\BackgroundJob\JobList|\PHPUnit\Framework\MockObject\MockObject */ private $jobList; - /** @var BackgroundRepair|\PHPUnit_Framework_MockObject_MockObject */ + /** @var BackgroundRepair|\PHPUnit\Framework\MockObject\MockObject */ private $job; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject $dispatcher */ + /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject $dispatcher */ private $dispatcher; protected function setUp(): void { diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index a33a06635c9..012130792ac 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -25,17 +25,17 @@ use OCP\IUserSession; use OCP\L10N\IFactory; class NavigationManagerTest extends TestCase { - /** @var AppManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var AppManager|\PHPUnit\Framework\MockObject\MockObject */ protected $appManager; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ protected $urlGenerator; - /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $l10nFac; - /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */ protected $userSession; - /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ protected $groupManager; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; /** @var \OC\NavigationManager */ diff --git a/tests/lib/Notification/ManagerTest.php b/tests/lib/Notification/ManagerTest.php index 57c7557e86c..cd0d4bd36c8 100644 --- a/tests/lib/Notification/ManagerTest.php +++ b/tests/lib/Notification/ManagerTest.php @@ -93,7 +93,7 @@ class ManagerTest extends TestCase { } public function testNotify() { - /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */ + /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(INotification::class) ->disableOriginalConstructor() ->getMock(); @@ -116,11 +116,11 @@ class ManagerTest extends TestCase { $manager->notify($notification); } - + public function testNotifyInvalid() { $this->expectException(\InvalidArgumentException::class); - /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */ + /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(INotification::class) ->disableOriginalConstructor() ->getMock(); @@ -143,7 +143,7 @@ class ManagerTest extends TestCase { } public function testMarkProcessed() { - /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */ + /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(INotification::class) ->disableOriginalConstructor() ->getMock(); @@ -164,7 +164,7 @@ class ManagerTest extends TestCase { } public function testGetCount() { - /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */ + /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(INotification::class) ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/Notification/NotificationTest.php b/tests/lib/Notification/NotificationTest.php index f8d80a0ab56..1479e8841a2 100644 --- a/tests/lib/Notification/NotificationTest.php +++ b/tests/lib/Notification/NotificationTest.php @@ -32,7 +32,7 @@ use Test\TestCase; class NotificationTest extends TestCase { /** @var INotification */ protected $notification; - /** @var IValidator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IValidator|\PHPUnit\Framework\MockObject\MockObject */ protected $validator; protected function setUp(): void { @@ -403,7 +403,7 @@ class NotificationTest extends TestCase { } public function testAddAction() { - /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */ + /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->once()) ->method('isValid') @@ -417,11 +417,11 @@ class NotificationTest extends TestCase { $this->assertEquals([], $this->notification->getParsedActions()); } - + public function testAddActionInvalid() { $this->expectException(\InvalidArgumentException::class); - /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */ + /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->once()) ->method('isValid') @@ -433,7 +433,7 @@ class NotificationTest extends TestCase { } public function testAddActionSecondPrimary() { - /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */ + /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->exactly(2)) ->method('isValid') @@ -449,7 +449,7 @@ class NotificationTest extends TestCase { } public function testAddParsedAction() { - /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */ + /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->once()) ->method('isValidParsed') @@ -463,11 +463,11 @@ class NotificationTest extends TestCase { $this->assertEquals([], $this->notification->getActions()); } - + public function testAddParsedActionInvalid() { $this->expectException(\InvalidArgumentException::class); - /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */ + /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->once()) ->method('isValidParsed') @@ -479,7 +479,7 @@ class NotificationTest extends TestCase { } public function testAddActionSecondParsedPrimary() { - /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */ + /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->createMock(IAction::class); $action->expects($this->exactly(2)) ->method('isValidParsed') @@ -495,7 +495,7 @@ class NotificationTest extends TestCase { } public function testAddActionParsedPrimaryEnd() { - /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */ + /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action1 = $this->createMock(IAction::class); $action1->expects($this->exactly(2)) ->method('isValidParsed') @@ -503,7 +503,7 @@ class NotificationTest extends TestCase { $action1->expects($this->exactly(2)) ->method('isPrimary') ->willReturn(false); - /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */ + /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action2 = $this->createMock(IAction::class); $action2->expects($this->once()) ->method('isValidParsed') @@ -536,7 +536,7 @@ class NotificationTest extends TestCase { * @param bool $expected */ public function testIsValid($isValidCommon, $subject, $expected) { - /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */ + /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(Notification::class) ->setMethods([ 'isValidCommon', @@ -569,7 +569,7 @@ class NotificationTest extends TestCase { * @param bool $expected */ public function testIsParsedValid($isValidCommon, $subject, $expected) { - /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */ + /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(Notification::class) ->setMethods([ 'isValidCommon', @@ -616,7 +616,7 @@ class NotificationTest extends TestCase { * @param bool $expected */ public function testIsValidCommon($app, $user, $timestamp, $objectType, $objectId, $expected) { - /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */ + /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(Notification::class) ->setMethods([ 'getApp', diff --git a/tests/lib/OCS/DiscoveryServiceTest.php b/tests/lib/OCS/DiscoveryServiceTest.php index d5baa1be2e2..195dac697e5 100644 --- a/tests/lib/OCS/DiscoveryServiceTest.php +++ b/tests/lib/OCS/DiscoveryServiceTest.php @@ -29,10 +29,10 @@ use Test\TestCase; class DiscoveryServiceTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject | ICacheFactory */ + /** @var \PHPUnit\Framework\MockObject\MockObject | ICacheFactory */ private $cacheFactory; - /** @var \PHPUnit_Framework_MockObject_MockObject | IClientService */ + /** @var \PHPUnit\Framework\MockObject\MockObject | IClientService */ private $clientService; /** @var IDiscoveryService */ diff --git a/tests/lib/Preview/GeneratorTest.php b/tests/lib/Preview/GeneratorTest.php index 5e9b9bcbb8d..d2bfcad9955 100644 --- a/tests/lib/Preview/GeneratorTest.php +++ b/tests/lib/Preview/GeneratorTest.php @@ -38,19 +38,19 @@ use Symfony\Component\EventDispatcher\GenericEvent; class GeneratorTest extends \Test\TestCase { - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var IPreview|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IPreview|\PHPUnit\Framework\MockObject\MockObject */ private $previewManager; - /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ private $appData; - /** @var GeneratorHelper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var GeneratorHelper|\PHPUnit\Framework\MockObject\MockObject */ private $helper; - /** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */ private $eventDispatcher; /** @var Generator */ diff --git a/tests/lib/Repair/CleanTagsTest.php b/tests/lib/Repair/CleanTagsTest.php index b724891cda7..468b715e5e4 100644 --- a/tests/lib/Repair/CleanTagsTest.php +++ b/tests/lib/Repair/CleanTagsTest.php @@ -27,7 +27,7 @@ class CleanTagsTest extends \Test\TestCase { /** @var \OCP\IDBConnection */ protected $connection; - /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IUserManager|\PHPUnit\Framework\MockObject\MockObject */ protected $userManager; /** @var int */ diff --git a/tests/lib/Repair/NC11/FixMountStoragesTest.php b/tests/lib/Repair/NC11/FixMountStoragesTest.php index 1d5af18a8a3..9bc61865235 100644 --- a/tests/lib/Repair/NC11/FixMountStoragesTest.php +++ b/tests/lib/Repair/NC11/FixMountStoragesTest.php @@ -68,7 +68,7 @@ class FixMountStoragesTest extends TestCase { $mount2 = $this->createMount($file2, 1337); $this->assertStorage($mount2, 1337); - /** @var IOutput|\PHPUnit_Framework_MockObject_MockObject $output */ + /** @var IOutput|\PHPUnit\Framework\MockObject\MockObject $output */ $output = $this->createMock(IOutput::class); $output->expects($this->at(0)) ->method('info') diff --git a/tests/lib/Repair/OldGroupMembershipSharesTest.php b/tests/lib/Repair/OldGroupMembershipSharesTest.php index dda23e8d3ab..adfba4a1ce7 100644 --- a/tests/lib/Repair/OldGroupMembershipSharesTest.php +++ b/tests/lib/Repair/OldGroupMembershipSharesTest.php @@ -27,13 +27,13 @@ class OldGroupMembershipSharesTest extends \Test\TestCase { /** @var \OCP\IDBConnection */ protected $connection; - /** @var \OCP\IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ protected $groupManager; protected function setUp(): void { parent::setUp(); - /** \OCP\IGroupManager|\PHPUnit_Framework_MockObject_MockObject */ + /** \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ $this->groupManager = $this->getMockBuilder('OCP\IGroupManager') ->disableOriginalConstructor() ->getMock(); @@ -83,7 +83,7 @@ class OldGroupMembershipSharesTest extends \Test\TestCase { $this->assertEquals([['id' => $parent], ['id' => $group2], ['id' => $user1], ['id' => $member], ['id' => $notAMember]], $rows); $result->closeCursor(); - /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */ + /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */ $outputMock = $this->getMockBuilder('\OCP\Migration\IOutput') ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/Repair/RepairCollationTest.php b/tests/lib/Repair/RepairCollationTest.php index 62471fbbe3a..9cba3e8e30a 100644 --- a/tests/lib/Repair/RepairCollationTest.php +++ b/tests/lib/Repair/RepairCollationTest.php @@ -84,7 +84,7 @@ class RepairCollationTest extends TestCase { $tables = $this->repair->getAllNonUTF8BinTables($this->connection); $this->assertGreaterThanOrEqual(1, count($tables)); - /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */ + /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */ $outputMock = $this->getMockBuilder('\OCP\Migration\IOutput') ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/Repair/RepairInvalidSharesTest.php b/tests/lib/Repair/RepairInvalidSharesTest.php index 748ca7a6048..64ae6322657 100644 --- a/tests/lib/Repair/RepairInvalidSharesTest.php +++ b/tests/lib/Repair/RepairInvalidSharesTest.php @@ -110,7 +110,7 @@ class RepairInvalidSharesTest extends TestCase { $this->assertEquals([['id' => $parent], ['id' => $validChild], ['id' => $invalidChild]], $rows); $result->closeCursor(); - /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */ + /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */ $outputMock = $this->getMockBuilder('\OCP\Migration\IOutput') ->disableOriginalConstructor() ->getMock(); @@ -173,7 +173,7 @@ class RepairInvalidSharesTest extends TestCase { $shareId = $this->getLastShareId(); - /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */ + /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */ $outputMock = $this->getMockBuilder('\OCP\Migration\IOutput') ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/Repair/RepairMimeTypesTest.php b/tests/lib/Repair/RepairMimeTypesTest.php index e6c6fdebf42..6f0791964b3 100644 --- a/tests/lib/Repair/RepairMimeTypesTest.php +++ b/tests/lib/Repair/RepairMimeTypesTest.php @@ -39,7 +39,7 @@ class RepairMimeTypesTest extends \Test\TestCase { $this->savedMimetypeLoader = \OC::$server->getMimeTypeLoader(); $this->mimetypeLoader = \OC::$server->getMimeTypeLoader(); - /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject $config */ + /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject $config */ $config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); @@ -99,7 +99,7 @@ class RepairMimeTypesTest extends \Test\TestCase { private function renameMimeTypes($currentMimeTypes, $fixedMimeTypes) { $this->addEntries($currentMimeTypes); - /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */ + /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */ $outputMock = $this->getMockBuilder('\OCP\Migration\IOutput') ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/Repair/RepairSqliteAutoincrementTest.php b/tests/lib/Repair/RepairSqliteAutoincrementTest.php index c740384fc0f..9db0d5630aa 100644 --- a/tests/lib/Repair/RepairSqliteAutoincrementTest.php +++ b/tests/lib/Repair/RepairSqliteAutoincrementTest.php @@ -78,7 +78,7 @@ class RepairSqliteAutoincrementTest extends \Test\TestCase { public function testConvertIdColumn() { $this->assertFalse($this->checkAutoincrement()); - /** @var IOutput | \PHPUnit_Framework_MockObject_MockObject $outputMock */ + /** @var IOutput | \PHPUnit\Framework\MockObject\MockObject $outputMock */ $outputMock = $this->getMockBuilder('\OCP\Migration\IOutput') ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/Security/Bruteforce/CapabilitiesTest.php b/tests/lib/Security/Bruteforce/CapabilitiesTest.php index 60873236e44..16c2b2caf15 100644 --- a/tests/lib/Security/Bruteforce/CapabilitiesTest.php +++ b/tests/lib/Security/Bruteforce/CapabilitiesTest.php @@ -30,10 +30,10 @@ class CapabilitiesTest extends TestCase { /** @var Capabilities */ private $capabilities; - /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var Throttler|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Throttler|\PHPUnit\Framework\MockObject\MockObject */ private $throttler; protected function setUp(): void { diff --git a/tests/lib/Security/Bruteforce/ThrottlerTest.php b/tests/lib/Security/Bruteforce/ThrottlerTest.php index 1c58849c9f8..b4a7016bc20 100644 --- a/tests/lib/Security/Bruteforce/ThrottlerTest.php +++ b/tests/lib/Security/Bruteforce/ThrottlerTest.php @@ -41,7 +41,7 @@ class ThrottlerTest extends TestCase { private $dbConnection; /** @var ILogger */ private $logger; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; protected function setUp(): void { @@ -153,7 +153,7 @@ class ThrottlerTest extends TestCase { 'dead:beef:cafe::1111', [ 'whitelist_0' => 'dead:beef:cafe::1100/123', - + ], true, ], diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php index d64c41c79e7..447ee8719c9 100644 --- a/tests/lib/Security/CertificateManagerTest.php +++ b/tests/lib/Security/CertificateManagerTest.php @@ -92,7 +92,7 @@ class CertificateManagerTest extends \Test\TestCase { $this->assertEqualsArrays($certificateStore, $this->certificateManager->listCertificates()); } - + public function testAddInvalidCertificate() { $this->expectException(\Exception::class); $this->expectExceptionMessage('Certificate could not get parsed.'); @@ -156,7 +156,7 @@ class CertificateManagerTest extends \Test\TestCase { ->disableOriginalConstructor()->getMock(); $config = $this->createMock(IConfig::class); - /** @var CertificateManager | \PHPUnit_Framework_MockObject_MockObject $certificateManager */ + /** @var CertificateManager | \PHPUnit\Framework\MockObject\MockObject $certificateManager */ $certificateManager = $this->getMockBuilder('OC\Security\CertificateManager') ->setConstructorArgs([$uid, $view, $config, $this->createMock(ILogger::class), $this->random]) ->setMethods(['getFilemtimeOfCaBundle', 'getCertificateBundle']) diff --git a/tests/lib/Security/IdentityProof/ManagerTest.php b/tests/lib/Security/IdentityProof/ManagerTest.php index 5fd1d709c2f..760c4911873 100644 --- a/tests/lib/Security/IdentityProof/ManagerTest.php +++ b/tests/lib/Security/IdentityProof/ManagerTest.php @@ -52,7 +52,7 @@ class ManagerTest extends TestCase { protected function setUp(): void { parent::setUp(); - /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ + /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */ $this->factory = $this->createMock(Factory::class); $this->appData = $this->createMock(AppData::class); $this->config = $this->createMock(IConfig::class); @@ -70,7 +70,7 @@ class ManagerTest extends TestCase { * create manager object * * @param array $setMethods - * @return Manager|\PHPUnit_Framework_MockObject_MockObject + * @return Manager|\PHPUnit\Framework\MockObject\MockObject */ protected function getManager($setMethods = []) { if (empty($setMethods)) { @@ -204,7 +204,7 @@ class ManagerTest extends TestCase { public function testGetSystemKey() { $manager = $this->getManager(['retrieveKey']); - /** @var Key|\PHPUnit_Framework_MockObject_MockObject $key */ + /** @var Key|\PHPUnit\Framework\MockObject\MockObject $key */ $key = $this->createMock(Key::class); $this->config->expects($this->once())->method('getSystemValue') @@ -217,13 +217,13 @@ class ManagerTest extends TestCase { } - + public function testGetSystemKeyFailure() { $this->expectException(\RuntimeException::class); $manager = $this->getManager(['retrieveKey']); - /** @var Key|\PHPUnit_Framework_MockObject_MockObject $key */ + /** @var Key|\PHPUnit\Framework\MockObject\MockObject $key */ $key = $this->createMock(Key::class); $this->config->expects($this->once())->method('getSystemValue') diff --git a/tests/lib/Security/IdentityProof/SignerTest.php b/tests/lib/Security/IdentityProof/SignerTest.php index 913ab7c15f5..3ce211d51e7 100644 --- a/tests/lib/Security/IdentityProof/SignerTest.php +++ b/tests/lib/Security/IdentityProof/SignerTest.php @@ -77,13 +77,13 @@ gQIDAQAB /** @var Key */ private $key; - /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */ private $keyManager; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; - /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */ private $userManager; /** @var Signer */ diff --git a/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php b/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php index e4df424c2ca..902c586dc13 100644 --- a/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php +++ b/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php @@ -28,11 +28,11 @@ use OCP\ICacheFactory; use Test\TestCase; class MemoryCacheTest extends TestCase { - /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ private $cacheFactory; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; - /** @var ICache|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICache|\PHPUnit\Framework\MockObject\MockObject */ private $cache; /** @var MemoryCache */ private $memoryCache; diff --git a/tests/lib/Security/RateLimiting/LimiterTest.php b/tests/lib/Security/RateLimiting/LimiterTest.php index ea74f476f3c..76121a49bc1 100644 --- a/tests/lib/Security/RateLimiting/LimiterTest.php +++ b/tests/lib/Security/RateLimiting/LimiterTest.php @@ -28,9 +28,9 @@ use OCP\IUser; use Test\TestCase; class LimiterTest extends TestCase { - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; - /** @var IBackend|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IBackend|\PHPUnit\Framework\MockObject\MockObject */ private $backend; /** @var Limiter */ private $limiter; @@ -47,7 +47,7 @@ class LimiterTest extends TestCase { ); } - + public function testRegisterAnonRequestExceeded() { $this->expectException(\OC\Security\RateLimiting\Exception\RateLimitExceededException::class); $this->expectExceptionMessage('Rate limit exceeded'); @@ -91,12 +91,12 @@ class LimiterTest extends TestCase { $this->limiter->registerAnonRequest('MyIdentifier', 100, 100, '127.0.0.1'); } - + public function testRegisterUserRequestExceeded() { $this->expectException(\OC\Security\RateLimiting\Exception\RateLimitExceededException::class); $this->expectExceptionMessage('Rate limit exceeded'); - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user ->expects($this->once()) @@ -116,7 +116,7 @@ class LimiterTest extends TestCase { } public function testRegisterUserRequestSuccess() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $user ->expects($this->once()) diff --git a/tests/lib/Session/CryptoSessionDataTest.php b/tests/lib/Session/CryptoSessionDataTest.php index 6de44032530..10bc62e099c 100644 --- a/tests/lib/Session/CryptoSessionDataTest.php +++ b/tests/lib/Session/CryptoSessionDataTest.php @@ -25,7 +25,7 @@ use OC\Session\CryptoSessionData; use OCP\Security\ICrypto; class CryptoSessionDataTest extends Session { - /** @var \PHPUnit_Framework_MockObject_MockObject|\OCP\Security\ICrypto */ + /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\Security\ICrypto */ protected $crypto; /** @var \OCP\ISession */ diff --git a/tests/lib/Session/CryptoWrappingTest.php b/tests/lib/Session/CryptoWrappingTest.php index fac515c8f52..b8635b99120 100644 --- a/tests/lib/Session/CryptoWrappingTest.php +++ b/tests/lib/Session/CryptoWrappingTest.php @@ -26,10 +26,10 @@ use OCP\ISession; use Test\TestCase; class CryptoWrappingTest extends TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject|\OCP\Security\ICrypto */ + /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\Security\ICrypto */ protected $crypto; - /** @var \PHPUnit_Framework_MockObject_MockObject|\OCP\ISession */ + /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\ISession */ protected $wrappedSession; /** @var \OC\Session\CryptoSessionData */ diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index a0d341266e8..3d967b2ed21 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -36,17 +36,17 @@ use Test\TestCase; class ManagerTest extends TestCase { - /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Manager|\PHPUnit\Framework\MockObject\MockObject */ private $manager; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var IDBConnection|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IDBConnection|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; - /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */ private $l10nFactory; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ private $url; - /** @var IServerContainer|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IServerContainer|\PHPUnit\Framework\MockObject\MockObject */ private $container; protected function setUp(): void { diff --git a/tests/lib/SetupTest.php b/tests/lib/SetupTest.php index 0890b70dfcd..696e1d69fbe 100644 --- a/tests/lib/SetupTest.php +++ b/tests/lib/SetupTest.php @@ -19,21 +19,21 @@ use OCP\Security\ISecureRandom; class SetupTest extends \Test\TestCase { - /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var \bantu\IniGetWrapper\IniGetWrapper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \bantu\IniGetWrapper\IniGetWrapper|\PHPUnit\Framework\MockObject\MockObject */ private $iniWrapper; - /** @var \OCP\IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10n; - /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject */ private $defaults; - /** @var \OC\Setup|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC\Setup|\PHPUnit\Framework\MockObject\MockObject */ protected $setupClass; - /** @var \OCP\ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; - /** @var \OCP\Security\ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \OCP\Security\ISecureRandom|\PHPUnit\Framework\MockObject\MockObject */ protected $random; - /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Installer|\PHPUnit\Framework\MockObject\MockObject */ protected $installer; protected function setUp(): void { @@ -120,7 +120,7 @@ class SetupTest extends \Test\TestCase { $this->assertSame($expectedResult, $result); } - + public function testGetSupportedDatabaseException() { $this->expectException(\Exception::class); $this->expectExceptionMessage('Supported databases are not properly configured.'); diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index b3de9d05a52..24474b11dcf 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -52,31 +52,31 @@ class DefaultShareProviderTest extends \Test\TestCase { /** @var IDBConnection */ protected $dbConn; - /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager | \PHPUnit\Framework\MockObject\MockObject */ protected $userManager; - /** @var IGroupManager | \PHPUnit_Framework_MockObject_MockObject */ + /** @var IGroupManager | \PHPUnit\Framework\MockObject\MockObject */ protected $groupManager; - /** @var IRootFolder | \PHPUnit_Framework_MockObject_MockObject */ + /** @var IRootFolder | \PHPUnit\Framework\MockObject\MockObject */ protected $rootFolder; /** @var DefaultShareProvider */ protected $provider; - /** @var \PHPUnit_Framework_MockObject_MockObject|IMailer */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IMailer */ protected $mailer; /** @var IFactory|MockObject */ protected $l10nFactory; - /** @var \PHPUnit_Framework_MockObject_MockObject|IL10N */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IL10N */ protected $l10n; - /** @var \PHPUnit_Framework_MockObject_MockObject|Defaults */ + /** @var \PHPUnit\Framework\MockObject\MockObject|Defaults */ protected $defaults; - /** @var \PHPUnit_Framework_MockObject_MockObject|IURLGenerator */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IURLGenerator */ protected $urlGenerator; /** @var IConfig|MockObject */ diff --git a/tests/lib/Share20/ShareHelperTest.php b/tests/lib/Share20/ShareHelperTest.php index d2f5cd79284..b3e76735aaa 100644 --- a/tests/lib/Share20/ShareHelperTest.php +++ b/tests/lib/Share20/ShareHelperTest.php @@ -31,7 +31,7 @@ use Test\TestCase; class ShareHelperTest extends TestCase { - /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ private $manager; /** @var ShareHelper */ @@ -77,9 +77,9 @@ class ShareHelperTest extends TestCase { 'remote' => $remoteList, ]); - /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */ + /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */ $node = $this->createMock(Node::class); - /** @var ShareHelper|\PHPUnit_Framework_MockObject_MockObject $helper */ + /** @var ShareHelper|\PHPUnit\Framework\MockObject\MockObject $helper */ $helper = $this->getMockBuilder(ShareHelper::class) ->setConstructorArgs([$this->manager]) ->setMethods(['getPathsForUsers', 'getPathsForRemotes']) @@ -128,7 +128,7 @@ class ShareHelperTest extends TestCase { public function testGetPathsForUsers(array $users, array $nodes, array $expected) { $lastNode = null; foreach ($nodes as $nodeId => $nodeName) { - /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */ + /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */ $node = $this->createMock(Node::class); $node->expects($this->any()) ->method('getId') @@ -185,7 +185,7 @@ class ShareHelperTest extends TestCase { public function testGetPathsForRemotes(array $remotes, array $nodes, array $expected) { $lastNode = null; foreach ($nodes as $nodeId => $nodePath) { - /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */ + /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */ $node = $this->createMock(Node::class); $node->expects($this->any()) ->method('getId') @@ -221,7 +221,7 @@ class ShareHelperTest extends TestCase { * @param string $expected */ public function testGetMountedPath($path, $expected) { - /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */ + /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */ $node = $this->createMock(Node::class); $node->expects($this->once()) ->method('getPath') diff --git a/tests/lib/Share20/ShareTest.php b/tests/lib/Share20/ShareTest.php index f7ea479350d..7d4dc6de2d6 100644 --- a/tests/lib/Share20/ShareTest.php +++ b/tests/lib/Share20/ShareTest.php @@ -31,7 +31,7 @@ use OCP\IUserManager; */ class ShareTest extends \Test\TestCase { - /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */ protected $rootFolder; /** @var \OCP\Share\IShare */ protected $share; @@ -42,7 +42,7 @@ class ShareTest extends \Test\TestCase { $this->share = new \OC\Share20\Share($this->rootFolder, $this->userManager); } - + public function testSetIdInvalid() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('String expected.'); @@ -61,7 +61,7 @@ class ShareTest extends \Test\TestCase { $this->assertEquals('foo', $this->share->getId()); } - + public function testSetIdOnce() { $this->expectException(\OCP\Share\Exceptions\IllegalIDChangeException::class); $this->expectExceptionMessage('Not allowed to assign a new internal id to a share'); @@ -70,7 +70,7 @@ class ShareTest extends \Test\TestCase { $this->share->setId('bar'); } - + public function testSetProviderIdInt() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('String expected.'); @@ -85,7 +85,7 @@ class ShareTest extends \Test\TestCase { $this->assertEquals('foo:bar', $this->share->getFullId()); } - + public function testSetProviderIdOnce() { $this->expectException(\OCP\Share\Exceptions\IllegalIDChangeException::class); $this->expectExceptionMessage('Not allowed to assign a new provider id to a share'); diff --git a/tests/lib/Support/Subscription/RegistryTest.php b/tests/lib/Support/Subscription/RegistryTest.php index 68159aa1b2b..c070f69ae66 100644 --- a/tests/lib/Support/Subscription/RegistryTest.php +++ b/tests/lib/Support/Subscription/RegistryTest.php @@ -75,7 +75,7 @@ class RegistryTest extends TestCase { } public function testDelegateHasValidSubscription() { - /* @var ISubscription|\PHPUnit_Framework_MockObject_MockObject $subscription */ + /* @var ISubscription|\PHPUnit\Framework\MockObject\MockObject $subscription */ $subscription = $this->createMock(ISubscription::class); $subscription->expects($this->once()) ->method('hasValidSubscription') @@ -86,7 +86,7 @@ class RegistryTest extends TestCase { } public function testDelegateHasValidSubscriptionConfig() { - /* @var ISubscription|\PHPUnit_Framework_MockObject_MockObject $subscription */ + /* @var ISubscription|\PHPUnit\Framework\MockObject\MockObject $subscription */ $this->config->expects($this->once()) ->method('getSystemValueBool') ->with('has_valid_subscription') @@ -96,7 +96,7 @@ class RegistryTest extends TestCase { } public function testDelegateHasExtendedSupport() { - /* @var ISubscription|\PHPUnit_Framework_MockObject_MockObject $subscription */ + /* @var ISubscription|\PHPUnit\Framework\MockObject\MockObject $subscription */ $subscription = $this->createMock(ISubscription::class); $subscription->expects($this->once()) ->method('hasExtendedSupport') @@ -108,7 +108,7 @@ class RegistryTest extends TestCase { public function testDelegateGetSupportedApps() { - /* @var ISupportedApps|\PHPUnit_Framework_MockObject_MockObject $subscription */ + /* @var ISupportedApps|\PHPUnit\Framework\MockObject\MockObject $subscription */ $subscription = $this->createMock(ISupportedApps::class); $subscription->expects($this->once()) ->method('getSupportedApps') diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php index 8c2a50e97ca..42fa06a474d 100644 --- a/tests/lib/Template/CSSResourceLocatorTest.php +++ b/tests/lib/Template/CSSResourceLocatorTest.php @@ -37,21 +37,21 @@ use OCP\ILogger; use OCP\IURLGenerator; class CSSResourceLocatorTest extends \Test\TestCase { - /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ protected $appData; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ protected $urlGenerator; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var ThemingDefaults|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ThemingDefaults|\PHPUnit\Framework\MockObject\MockObject */ protected $themingDefaults; - /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $cacheFactory; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; - /** @var IconsCacher|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IconsCacher|\PHPUnit\Framework\MockObject\MockObject */ protected $iconsCacher; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; protected function setUp(): void { @@ -68,7 +68,7 @@ class CSSResourceLocatorTest extends \Test\TestCase { } private function cssResourceLocator() { - /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ + /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */ $factory = $this->createMock(Factory::class); $factory->method('get')->with('css')->willReturn($this->appData); $scssCacher = new SCSSCacher( diff --git a/tests/lib/Template/IconsCacherTest.php b/tests/lib/Template/IconsCacherTest.php index 4b5c6a73ef8..24b3c21052f 100644 --- a/tests/lib/Template/IconsCacherTest.php +++ b/tests/lib/Template/IconsCacherTest.php @@ -36,13 +36,13 @@ use OCP\ILogger; use OCP\IURLGenerator; class IconsCacherTest extends \Test\TestCase { - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; - /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ protected $appData; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ protected $urlGenerator; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; protected function setUp(): void { @@ -50,7 +50,7 @@ class IconsCacherTest extends \Test\TestCase { $this->appData = $this->createMock(AppData::class); $this->timeFactory = $this->createMock(ITimeFactory::class); - /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ + /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */ $factory = $this->createMock(Factory::class); $factory->method('get')->with('css')->willReturn($this->appData); diff --git a/tests/lib/Template/JSCombinerTest.php b/tests/lib/Template/JSCombinerTest.php index 0cdea95fd6f..87abff99123 100644 --- a/tests/lib/Template/JSCombinerTest.php +++ b/tests/lib/Template/JSCombinerTest.php @@ -36,19 +36,19 @@ use OCP\ILogger; use OCP\IURLGenerator; class JSCombinerTest extends \Test\TestCase { - /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ protected $appData; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ protected $urlGenerator; - /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var ICache|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICache|\PHPUnit\Framework\MockObject\MockObject */ protected $depsCache; /** @var JSCombiner */ protected $jsCombiner; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; - /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $cacheFactory; protected function setUp(): void { diff --git a/tests/lib/Template/JSResourceLocatorTest.php b/tests/lib/Template/JSResourceLocatorTest.php index 3f5d157e7f5..cdc3606f020 100644 --- a/tests/lib/Template/JSResourceLocatorTest.php +++ b/tests/lib/Template/JSResourceLocatorTest.php @@ -32,15 +32,15 @@ use OCP\ILogger; use OCP\IURLGenerator; class JSResourceLocatorTest extends \Test\TestCase { - /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ protected $appData; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ protected $urlGenerator; - /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $cacheFactory; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; protected function setUp(): void { diff --git a/tests/lib/Template/ResourceLocatorTest.php b/tests/lib/Template/ResourceLocatorTest.php index 71f39a1179e..d23d17778d4 100644 --- a/tests/lib/Template/ResourceLocatorTest.php +++ b/tests/lib/Template/ResourceLocatorTest.php @@ -12,7 +12,7 @@ use OC\Template\ResourceNotFoundException; use OCP\ILogger; class ResourceLocatorTest extends \Test\TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ + /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $logger; protected function setUp(): void { @@ -25,7 +25,7 @@ class ResourceLocatorTest extends \Test\TestCase { * @param array $core_map * @param array $party_map * @param array $appsRoots - * @return \PHPUnit_Framework_MockObject_MockObject + * @return \PHPUnit\Framework\MockObject\MockObject */ public function getResourceLocator($theme, $core_map, $party_map, $appsRoots) { return $this->getMockForAbstractClass('OC\Template\ResourceLocator', diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php index 9dfd8d20fea..1a77f789afe 100644 --- a/tests/lib/Template/SCSSCacherTest.php +++ b/tests/lib/Template/SCSSCacherTest.php @@ -40,25 +40,25 @@ use OCP\ILogger; use OCP\IURLGenerator; class SCSSCacherTest extends \Test\TestCase { - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; - /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ protected $appData; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ protected $urlGenerator; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - /** @var ThemingDefaults|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ThemingDefaults|\PHPUnit\Framework\MockObject\MockObject */ protected $themingDefaults; /** @var SCSSCacher */ protected $scssCacher; - /** @var ICache|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICache|\PHPUnit\Framework\MockObject\MockObject */ protected $depsCache; - /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $cacheFactory; - /** @var IconsCacher|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IconsCacher|\PHPUnit\Framework\MockObject\MockObject */ protected $iconsCacher; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $timeFactory; protected function setUp(): void { @@ -68,7 +68,7 @@ class SCSSCacherTest extends \Test\TestCase { $this->iconsCacher = $this->createMock(IconsCacher::class); $this->timeFactory = $this->createMock(ITimeFactory::class); - /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ + /** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */ $factory = $this->createMock(Factory::class); $factory->method('get')->with('css')->willReturn($this->appData); diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php index 38cfc4a1c8f..13a6fb0cf94 100644 --- a/tests/lib/TestCase.php +++ b/tests/lib/TestCase.php @@ -473,13 +473,13 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { require_once __DIR__.'/../../lib/private/legacy/template/functions.php'; $requestToken = 12345; - /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject $l10n */ + /** @var Defaults|\PHPUnit\Framework\MockObject\MockObject $l10n */ $theme = $this->getMockBuilder('\OCP\Defaults') ->disableOriginalConstructor()->getMock(); $theme->expects($this->any()) ->method('getName') ->willReturn('Nextcloud'); - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject $l10n */ + /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject $l10n */ $l10n = $this->getMockBuilder(IL10N::class) ->disableOriginalConstructor()->getMock(); $l10n diff --git a/tests/lib/Traits/ClientServiceTrait.php b/tests/lib/Traits/ClientServiceTrait.php index cab28e76dba..e9e9787d734 100644 --- a/tests/lib/Traits/ClientServiceTrait.php +++ b/tests/lib/Traits/ClientServiceTrait.php @@ -26,9 +26,9 @@ use OCP\Http\Client\IClientService; use OCP\Http\Client\IResponse; trait ClientServiceTrait { - /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */ private $clientService; - /** @var IClient|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IClient|\PHPUnit\Framework\MockObject\MockObject */ private $client; private $expectedGetRequests = []; private $expectedPostRequests = []; @@ -37,7 +37,7 @@ trait ClientServiceTrait { * Wrapper to be forward compatible to phpunit 5.4+ * * @param string $originalClassName - * @return \PHPUnit_Framework_MockObject_MockObject + * @return \PHPUnit\Framework\MockObject\MockObject */ abstract protected function createMock($originalClassName); @@ -112,7 +112,7 @@ trait ClientServiceTrait { } /** - * @return IClientService|\PHPUnit_Framework_MockObject_MockObject + * @return IClientService|\PHPUnit\Framework\MockObject\MockObject */ protected function getClientService() { return $this->clientService; diff --git a/tests/lib/Updater/ChangesCheckTest.php b/tests/lib/Updater/ChangesCheckTest.php index 4d7dce43ee1..1daff9ce1fb 100644 --- a/tests/lib/Updater/ChangesCheckTest.php +++ b/tests/lib/Updater/ChangesCheckTest.php @@ -37,16 +37,16 @@ use OCP\ILogger; use Test\TestCase; class ChangesCheckTest extends TestCase { - /** @var IClientService|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IClientService|\PHPUnit\Framework\MockObject\MockObject */ protected $clientService; /** @var ChangesCheck */ protected $checker; - /** @var ChangesMapper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ChangesMapper|\PHPUnit\Framework\MockObject\MockObject */ protected $mapper; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ protected $logger; protected function setUp(): void { diff --git a/tests/lib/Updater/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php index 2f139319bbf..f4216ddb0a3 100644 --- a/tests/lib/Updater/VersionCheckTest.php +++ b/tests/lib/Updater/VersionCheckTest.php @@ -28,9 +28,9 @@ use OCP\IConfig; use OCP\Util; class VersionCheckTest extends \Test\TestCase { - /** @var IConfig| \PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig| \PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var VersionCheck | \PHPUnit_Framework_MockObject_MockObject*/ + /** @var VersionCheck | \PHPUnit\Framework\MockObject\MockObject*/ private $updater; protected function setUp(): void { diff --git a/tests/lib/UpdaterTest.php b/tests/lib/UpdaterTest.php index 3ccf4c8b8c7..1affd6d020a 100644 --- a/tests/lib/UpdaterTest.php +++ b/tests/lib/UpdaterTest.php @@ -29,15 +29,15 @@ use OCP\IConfig; use OCP\ILogger; class UpdaterTest extends TestCase { - /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var ILogger | \PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */ private $logger; /** @var Updater */ private $updater; - /** @var Checker | \PHPUnit_Framework_MockObject_MockObject */ + /** @var Checker | \PHPUnit\Framework\MockObject\MockObject */ private $checker; - /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */ + /** @var Installer|\PHPUnit\Framework\MockObject\MockObject */ private $installer; protected function setUp(): void { diff --git a/tests/lib/UrlGeneratorTest.php b/tests/lib/UrlGeneratorTest.php index 03f55ff2244..46508a217d8 100644 --- a/tests/lib/UrlGeneratorTest.php +++ b/tests/lib/UrlGeneratorTest.php @@ -18,11 +18,11 @@ use OCP\IURLGenerator; */ class UrlGeneratorTest extends \Test\TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject|IConfig */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IConfig */ private $config; - /** @var \PHPUnit_Framework_MockObject_MockObject|ICacheFactory */ + /** @var \PHPUnit\Framework\MockObject\MockObject|ICacheFactory */ private $cacheFactory; - /** @var \PHPUnit_Framework_MockObject_MockObject|IRequest */ + /** @var \PHPUnit\Framework\MockObject\MockObject|IRequest */ private $request; /** @var IURLGenerator */ private $urlGenerator; diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php index 7cc42e81ba2..6037277932d 100644 --- a/tests/lib/User/ManagerTest.php +++ b/tests/lib/User/ManagerTest.php @@ -55,7 +55,7 @@ class ManagerTest extends TestCase { public function testUserExistsSingleBackendExists() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -71,7 +71,7 @@ class ManagerTest extends TestCase { public function testUserExistsSingleBackendNotExists() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -93,7 +93,7 @@ class ManagerTest extends TestCase { public function testUserExistsTwoBackendsSecondExists() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend1 + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend1 */ $backend1 = $this->createMock(\Test\Util\User\Dummy::class); $backend1->expects($this->once()) @@ -102,7 +102,7 @@ class ManagerTest extends TestCase { ->willReturn(false); /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend2 + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend2 */ $backend2 = $this->createMock(\Test\Util\User\Dummy::class); $backend2->expects($this->once()) @@ -119,7 +119,7 @@ class ManagerTest extends TestCase { public function testUserExistsTwoBackendsFirstExists() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend1 + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend1 */ $backend1 = $this->createMock(\Test\Util\User\Dummy::class); $backend1->expects($this->once()) @@ -128,7 +128,7 @@ class ManagerTest extends TestCase { ->willReturn(true); /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend2 + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend2 */ $backend2 = $this->createMock(\Test\Util\User\Dummy::class); $backend2->expects($this->never()) @@ -143,7 +143,7 @@ class ManagerTest extends TestCase { public function testCheckPassword() { /** - * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \OC\User\Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -170,7 +170,7 @@ class ManagerTest extends TestCase { public function testCheckPasswordNotSupported() { /** - * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \OC\User\Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->never()) @@ -188,7 +188,7 @@ class ManagerTest extends TestCase { public function testGetOneBackendExists() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -206,7 +206,7 @@ class ManagerTest extends TestCase { public function testGetOneBackendNotExists() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -222,7 +222,7 @@ class ManagerTest extends TestCase { public function testGetOneBackendDoNotTranslateLoginNames() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -240,7 +240,7 @@ class ManagerTest extends TestCase { public function testSearchOneBackend() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -263,7 +263,7 @@ class ManagerTest extends TestCase { public function testSearchTwoBackendLimitOffset() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend1 + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend1 */ $backend1 = $this->createMock(\Test\Util\User\Dummy::class); $backend1->expects($this->once()) @@ -274,7 +274,7 @@ class ManagerTest extends TestCase { ->method('loginName2UserName'); /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend2 + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend2 */ $backend2 = $this->createMock(\Test\Util\User\Dummy::class); $backend2->expects($this->once()) @@ -330,7 +330,7 @@ class ManagerTest extends TestCase { * @dataProvider dataCreateUserInvalid */ public function testCreateUserInvalid($uid, $password, $exception) { - /** @var \Test\Util\User\Dummy|\PHPUnit_Framework_MockObject_MockObject $backend */ + /** @var \Test\Util\User\Dummy|\PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) ->method('implementsActions') @@ -347,7 +347,7 @@ class ManagerTest extends TestCase { public function testCreateUserSingleBackendNotExists() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->any()) @@ -377,7 +377,7 @@ class ManagerTest extends TestCase { $this->expectException(\Exception::class); /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->any()) @@ -400,7 +400,7 @@ class ManagerTest extends TestCase { public function testCreateUserSingleBackendNotSupported() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->any()) @@ -430,9 +430,9 @@ class ManagerTest extends TestCase { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Could not create user'); - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject $config */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */ $config = $this->createMock(IConfig::class); - /** @var \Test\Util\User\Dummy|\PHPUnit_Framework_MockObject_MockObject $backend */ + /** @var \Test\Util\User\Dummy|\PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend ->expects($this->once()) @@ -449,7 +449,7 @@ class ManagerTest extends TestCase { $this->expectException(\Exception::class); /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend1 + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend1 */ $backend1 = $this->createMock(\Test\Util\User\Dummy::class); $backend1->expects($this->any()) @@ -465,7 +465,7 @@ class ManagerTest extends TestCase { ->willReturn(false); /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend2 + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend2 */ $backend2 = $this->createMock(\Test\Util\User\Dummy::class); $backend2->expects($this->any()) @@ -497,7 +497,7 @@ class ManagerTest extends TestCase { public function testCountUsersOneBackend() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -526,7 +526,7 @@ class ManagerTest extends TestCase { public function testCountUsersTwoBackends() { /** - * @var \Test\Util\User\Dummy | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \Test\Util\User\Dummy | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend1 = $this->createMock(\Test\Util\User\Dummy::class); $backend1->expects($this->once()) diff --git a/tests/lib/User/UserTest.php b/tests/lib/User/UserTest.php index 4e527addc6e..3a9c7766e3c 100644 --- a/tests/lib/User/UserTest.php +++ b/tests/lib/User/UserTest.php @@ -41,7 +41,7 @@ class UserTest extends TestCase { public function testDisplayName() { /** - * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \OC\User\Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\OC\User\Backend::class); $backend->expects($this->once()) @@ -63,7 +63,7 @@ class UserTest extends TestCase { */ public function testDisplayNameEmpty() { /** - * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \OC\User\Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\OC\User\Backend::class); $backend->expects($this->once()) @@ -82,7 +82,7 @@ class UserTest extends TestCase { public function testDisplayNameNotSupported() { /** - * @var \OC\User\Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var \OC\User\Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\OC\User\Backend::class); $backend->expects($this->never()) @@ -99,7 +99,7 @@ class UserTest extends TestCase { public function testSetPassword() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -122,7 +122,7 @@ class UserTest extends TestCase { public function testSetPasswordNotSupported() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->never()) @@ -138,7 +138,7 @@ class UserTest extends TestCase { public function testChangeAvatarSupportedYes() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(AvatarUserDummy::class); $backend->expects($this->once()) @@ -162,7 +162,7 @@ class UserTest extends TestCase { public function testChangeAvatarSupportedNo() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(AvatarUserDummy::class); $backend->expects($this->once()) @@ -186,7 +186,7 @@ class UserTest extends TestCase { public function testChangeAvatarNotSupported() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(AvatarUserDummy::class); $backend->expects($this->never()) @@ -202,7 +202,7 @@ class UserTest extends TestCase { public function testDelete() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -215,7 +215,7 @@ class UserTest extends TestCase { public function testDeleteWithDifferentHome() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -247,7 +247,7 @@ class UserTest extends TestCase { public function testGetHome() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -278,7 +278,7 @@ class UserTest extends TestCase { public function testGetHomeNotSupported() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->never()) @@ -305,7 +305,7 @@ class UserTest extends TestCase { public function testCanChangePassword() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -325,7 +325,7 @@ class UserTest extends TestCase { public function testCanChangePasswordNotSupported() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -339,7 +339,7 @@ class UserTest extends TestCase { public function testCanChangeDisplayName() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -359,7 +359,7 @@ class UserTest extends TestCase { public function testCanChangeDisplayNameNotSupported() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -373,7 +373,7 @@ class UserTest extends TestCase { public function testSetDisplayNameSupported() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\OC\User\Database::class); @@ -402,7 +402,7 @@ class UserTest extends TestCase { */ public function testSetDisplayNameEmpty() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\OC\User\Database::class); @@ -423,7 +423,7 @@ class UserTest extends TestCase { public function testSetDisplayNameNotSupported() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\OC\User\Database::class); @@ -444,7 +444,7 @@ class UserTest extends TestCase { $test = $this; /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -497,7 +497,7 @@ class UserTest extends TestCase { $test = $this; /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -574,7 +574,7 @@ class UserTest extends TestCase { public function testGetCloudId() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); $urlGenerator = $this->getMockBuilder('\OC\URLGenerator') @@ -591,7 +591,7 @@ class UserTest extends TestCase { public function testSetEMailAddressEmpty() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -627,7 +627,7 @@ class UserTest extends TestCase { public function testSetEMailAddress() { /** - * @var UserInterface | \PHPUnit_Framework_MockObject_MockObject $backend + * @var UserInterface | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -664,11 +664,11 @@ class UserTest extends TestCase { public function testSetEMailAddressNoChange() { /** - * @var UserInterface | \PHPUnit_Framework_MockObject_MockObject $backend + * @var UserInterface | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); - /** @var PublicEmitter|\PHPUnit_Framework_MockObject_MockObject $emitter */ + /** @var PublicEmitter|\PHPUnit\Framework\MockObject\MockObject $emitter */ $emitter = $this->createMock(PublicEmitter::class); $emitter->expects($this->never()) ->method('emit'); @@ -686,7 +686,7 @@ class UserTest extends TestCase { public function testSetQuota() { /** - * @var UserInterface | \PHPUnit_Framework_MockObject_MockObject $backend + * @var UserInterface | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -723,11 +723,11 @@ class UserTest extends TestCase { public function testSetQuotaAddressNoChange() { /** - * @var UserInterface | \PHPUnit_Framework_MockObject_MockObject $backend + * @var UserInterface | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); - /** @var PublicEmitter|\PHPUnit_Framework_MockObject_MockObject $emitter */ + /** @var PublicEmitter|\PHPUnit\Framework\MockObject\MockObject $emitter */ $emitter = $this->createMock(PublicEmitter::class); $emitter->expects($this->never()) ->method('emit'); @@ -745,7 +745,7 @@ class UserTest extends TestCase { public function testGetLastLogin() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -765,7 +765,7 @@ class UserTest extends TestCase { public function testSetEnabled() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -785,7 +785,7 @@ class UserTest extends TestCase { public function testSetDisabled() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -825,7 +825,7 @@ class UserTest extends TestCase { public function testSetDisabledAlreadyDisabled() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); @@ -855,7 +855,7 @@ class UserTest extends TestCase { public function testGetEMailAddress() { /** - * @var Backend | \PHPUnit_Framework_MockObject_MockObject $backend + * @var Backend | \PHPUnit\Framework\MockObject\MockObject $backend */ $backend = $this->createMock(\Test\Util\User\Dummy::class); diff --git a/tests/lib/UtilCheckServerTest.php b/tests/lib/UtilCheckServerTest.php index b5a05535009..9ddb1f8e45f 100644 --- a/tests/lib/UtilCheckServerTest.php +++ b/tests/lib/UtilCheckServerTest.php @@ -18,7 +18,7 @@ class UtilCheckServerTest extends \Test\TestCase { /** * @param array $systemOptions - * @return \OC\SystemConfig | \PHPUnit_Framework_MockObject_MockObject + * @return \OC\SystemConfig | \PHPUnit\Framework\MockObject\MockObject */ protected function getConfig($systemOptions) { $systemOptions['datadirectory'] = $this->datadir; -- cgit v1.2.3