diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-21 16:40:38 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 13:34:41 +0100 |
commit | c007ca624f4a95e1a491221d425fcb2fa6e5589a (patch) | |
tree | b60aa133b438eb116ac3579283aa8a7967efd12b /tests/lib/Security | |
parent | e0f32814e33f9ebb8c42744611048cbfac1eb588 (diff) | |
download | nextcloud-server-c007ca624f4a95e1a491221d425fcb2fa6e5589a.tar.gz nextcloud-server-c007ca624f4a95e1a491221d425fcb2fa6e5589a.zip |
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Security')
20 files changed, 21 insertions, 21 deletions
diff --git a/tests/lib/Security/Bruteforce/CapabilitiesTest.php b/tests/lib/Security/Bruteforce/CapabilitiesTest.php index e9b998c7bc8..001d9983617 100644 --- a/tests/lib/Security/Bruteforce/CapabilitiesTest.php +++ b/tests/lib/Security/Bruteforce/CapabilitiesTest.php @@ -36,7 +36,7 @@ class CapabilitiesTest extends TestCase { /** @var Throttler|\PHPUnit_Framework_MockObject_MockObject */ private $throttler; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/lib/Security/Bruteforce/ThrottlerTest.php b/tests/lib/Security/Bruteforce/ThrottlerTest.php index e68ae70e152..7fbcd763ce6 100644 --- a/tests/lib/Security/Bruteforce/ThrottlerTest.php +++ b/tests/lib/Security/Bruteforce/ThrottlerTest.php @@ -44,7 +44,7 @@ class ThrottlerTest extends TestCase { /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ private $config; - public function setUp() { + public function setUp(): void { $this->dbConnection = $this->createMock(IDBConnection::class); $this->logger = $this->createMock(ILogger::class); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php b/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php index 7ee7350c661..e96111a06df 100644 --- a/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php +++ b/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php @@ -37,7 +37,7 @@ class ContentSecurityPolicyManagerTest extends TestCase { /** @var ContentSecurityPolicyManager */ private $contentSecurityPolicyManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dispatcher = \OC::$server->query(IEventDispatcher::class); $this->contentSecurityPolicyManager = new ContentSecurityPolicyManager($this->dispatcher); diff --git a/tests/lib/Security/CSP/ContentSecurityPolicyNonceManagerTest.php b/tests/lib/Security/CSP/ContentSecurityPolicyNonceManagerTest.php index 705a0b22db8..cb2a8f0d931 100644 --- a/tests/lib/Security/CSP/ContentSecurityPolicyNonceManagerTest.php +++ b/tests/lib/Security/CSP/ContentSecurityPolicyNonceManagerTest.php @@ -35,7 +35,7 @@ class ContentSecurityPolicyNonceManagerTest extends TestCase { /** @var ContentSecurityPolicyNonceManager */ private $nonceManager; - public function setUp() { + public function setUp(): void { $this->csrfTokenManager = $this->createMock(CsrfTokenManager::class); $this->request = $this->createMock(Request::class); $this->nonceManager = new ContentSecurityPolicyNonceManager( diff --git a/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php b/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php index 424f620b619..314902fb725 100644 --- a/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php +++ b/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php @@ -27,7 +27,7 @@ class CsrfTokenGeneratorTest extends \Test\TestCase { /** @var \OC\Security\CSRF\CsrfTokenGenerator */ private $csrfTokenGenerator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->random = $this->getMockBuilder('\OCP\Security\ISecureRandom') ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Security/CSRF/CsrfTokenManagerTest.php b/tests/lib/Security/CSRF/CsrfTokenManagerTest.php index f9dd8127e5a..0f9755c2251 100644 --- a/tests/lib/Security/CSRF/CsrfTokenManagerTest.php +++ b/tests/lib/Security/CSRF/CsrfTokenManagerTest.php @@ -29,7 +29,7 @@ class CsrfTokenManagerTest extends \Test\TestCase { /** @var \OC\Security\CSRF\TokenStorage\SessionStorage */ private $storageInterface; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tokenGenerator = $this->getMockBuilder('\OC\Security\CSRF\CsrfTokenGenerator') ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php index 92a6557f8e3..19b13f76d86 100644 --- a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php +++ b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php @@ -29,7 +29,7 @@ class SessionStorageTest extends \Test\TestCase { /** @var \OC\Security\CSRF\TokenStorage\SessionStorage */ private $sessionStorage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->session = $this->getMockBuilder(ISession::class) ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php index 04da057a14c..e7d15e65c52 100644 --- a/tests/lib/Security/CertificateManagerTest.php +++ b/tests/lib/Security/CertificateManagerTest.php @@ -31,7 +31,7 @@ class CertificateManagerTest extends \Test\TestCase { /** @var ISecureRandom */ private $random; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->username = $this->getUniqueID('', 20); @@ -62,7 +62,7 @@ class CertificateManagerTest extends \Test\TestCase { ); } - protected function tearDown() { + protected function tearDown(): void { $user = \OC::$server->getUserManager()->get($this->username); if ($user !== null) { $user->delete(); diff --git a/tests/lib/Security/CertificateTest.php b/tests/lib/Security/CertificateTest.php index 21d1dab4ab8..c9d6ea90bd6 100644 --- a/tests/lib/Security/CertificateTest.php +++ b/tests/lib/Security/CertificateTest.php @@ -32,7 +32,7 @@ class CertificateTest extends \Test\TestCase { /** @var Certificate That contains an expired certificate */ protected $expiredCertificate; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $goodCertificate = file_get_contents(__DIR__ . '/../../data/certificates/goodCertificate.crt'); diff --git a/tests/lib/Security/CredentialsManagerTest.php b/tests/lib/Security/CredentialsManagerTest.php index d1cbdcd3366..0b93c704b5c 100644 --- a/tests/lib/Security/CredentialsManagerTest.php +++ b/tests/lib/Security/CredentialsManagerTest.php @@ -38,7 +38,7 @@ class CredentialsManagerTest extends \Test\TestCase { /** @var CredentialsManager */ protected $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->crypto = $this->createMock(ICrypto::class); $this->dbConnection = $this->getMockBuilder('\OC\DB\Connection') diff --git a/tests/lib/Security/CryptoTest.php b/tests/lib/Security/CryptoTest.php index ff164cddc9d..b0032a555fd 100644 --- a/tests/lib/Security/CryptoTest.php +++ b/tests/lib/Security/CryptoTest.php @@ -24,7 +24,7 @@ class CryptoTest extends \Test\TestCase { /** @var Crypto */ protected $crypto; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->crypto = new Crypto(\OC::$server->getConfig(), \OC::$server->getSecureRandom()); } diff --git a/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php b/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php index b4182068b8a..ec8ffbee77b 100644 --- a/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php +++ b/tests/lib/Security/FeaturePolicy/FeaturePolicyManagerTest.php @@ -42,7 +42,7 @@ class FeaturePolicyManagerTest extends TestCase { /** @var FeaturePolicyManager */ private $manager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dispatcher = \OC::$server->query(IEventDispatcher::class); $this->manager = new FeaturePolicyManager($this->dispatcher); diff --git a/tests/lib/Security/HasherTest.php b/tests/lib/Security/HasherTest.php index c994b68f781..3222b5d0984 100644 --- a/tests/lib/Security/HasherTest.php +++ b/tests/lib/Security/HasherTest.php @@ -97,7 +97,7 @@ class HasherTest extends \Test\TestCase { /** @var IConfig */ protected $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Security/IdentityProof/KeyTest.php b/tests/lib/Security/IdentityProof/KeyTest.php index bb550bd1b2a..34493df9878 100644 --- a/tests/lib/Security/IdentityProof/KeyTest.php +++ b/tests/lib/Security/IdentityProof/KeyTest.php @@ -30,7 +30,7 @@ class KeyTest extends TestCase { /** @var Key */ private $key; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->key = new Key('public', 'private'); diff --git a/tests/lib/Security/IdentityProof/ManagerTest.php b/tests/lib/Security/IdentityProof/ManagerTest.php index 2d66845ba8d..9e58ac5c00f 100644 --- a/tests/lib/Security/IdentityProof/ManagerTest.php +++ b/tests/lib/Security/IdentityProof/ManagerTest.php @@ -50,7 +50,7 @@ class ManagerTest extends TestCase { /** @var ILogger|MockObject */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); /** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */ diff --git a/tests/lib/Security/IdentityProof/SignerTest.php b/tests/lib/Security/IdentityProof/SignerTest.php index 114c03348f6..850ae08d4f0 100644 --- a/tests/lib/Security/IdentityProof/SignerTest.php +++ b/tests/lib/Security/IdentityProof/SignerTest.php @@ -89,7 +89,7 @@ gQIDAQAB /** @var Signer */ private $signer; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->key = new Key($this->public, $this->private); diff --git a/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php b/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php index 098c40ba0e8..d117f7d8c70 100644 --- a/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php +++ b/tests/lib/Security/RateLimiting/Backend/MemoryCacheTest.php @@ -37,7 +37,7 @@ class MemoryCacheTest extends TestCase { /** @var MemoryCache */ private $memoryCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->cacheFactory = $this->createMock(ICacheFactory::class); diff --git a/tests/lib/Security/RateLimiting/LimiterTest.php b/tests/lib/Security/RateLimiting/LimiterTest.php index 5d42104ba82..1e72f8e4960 100644 --- a/tests/lib/Security/RateLimiting/LimiterTest.php +++ b/tests/lib/Security/RateLimiting/LimiterTest.php @@ -38,7 +38,7 @@ class LimiterTest extends TestCase { /** @var Limiter */ private $limiter; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->timeFactory = $this->createMock(ITimeFactory::class); diff --git a/tests/lib/Security/SecureRandomTest.php b/tests/lib/Security/SecureRandomTest.php index 500e18d0ca6..71839115a3c 100644 --- a/tests/lib/Security/SecureRandomTest.php +++ b/tests/lib/Security/SecureRandomTest.php @@ -35,7 +35,7 @@ class SecureRandomTest extends \Test\TestCase { /** @var SecureRandom */ protected $rng; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->rng = new \OC\Security\SecureRandom(); } diff --git a/tests/lib/Security/TrustedDomainHelperTest.php b/tests/lib/Security/TrustedDomainHelperTest.php index 3fe0889b796..26158401f79 100644 --- a/tests/lib/Security/TrustedDomainHelperTest.php +++ b/tests/lib/Security/TrustedDomainHelperTest.php @@ -18,7 +18,7 @@ class TrustedDomainHelperTest extends \Test\TestCase { /** @var IConfig */ protected $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); |