diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-11 21:32:18 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-12 13:55:19 +0200 |
commit | 234b510652d117bb3ef9ef3b6315db3a2c2eb91b (patch) | |
tree | 880cec2bf4fe4846eff9fa5aa68d2671fb0495be /tests/lib/Security | |
parent | 138f47a1b980aaceb116b256b8ccf14f523e7e67 (diff) | |
download | nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.tar.gz nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.zip |
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/lib/Security')
7 files changed, 23 insertions, 23 deletions
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()) |