summaryrefslogtreecommitdiffstats
path: root/tests/lib/Security
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 09:30:18 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 16:34:56 +0100
commitb80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch)
treeec20e0ffa2f86b9b54939a83a785407319f94559 /tests/lib/Security
parent62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff)
downloadnextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz
nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Security')
-rw-r--r--tests/lib/Security/CertificateManagerTest.php4
-rw-r--r--tests/lib/Security/CryptoTest.php10
-rw-r--r--tests/lib/Security/SecureRandomTest.php28
3 files changed, 21 insertions, 21 deletions
diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php
index 136c3160413..f7196373c00 100644
--- a/tests/lib/Security/CertificateManagerTest.php
+++ b/tests/lib/Security/CertificateManagerTest.php
@@ -79,11 +79,11 @@ class CertificateManagerTest extends \Test\TestCase {
function testListCertificates() {
// Test empty certificate bundle
- $this->assertSame(array(), $this->certificateManager->listCertificates());
+ $this->assertSame([], $this->certificateManager->listCertificates());
// Add some certificates
$this->certificateManager->addCertificate(file_get_contents(__DIR__ . '/../../data/certificates/goodCertificate.crt'), 'GoodCertificate');
- $certificateStore = array();
+ $certificateStore = [];
$certificateStore[] = new \OC\Security\Certificate(file_get_contents(__DIR__ . '/../../data/certificates/goodCertificate.crt'), 'GoodCertificate');
$this->assertEqualsArrays($certificateStore, $this->certificateManager->listCertificates());
diff --git a/tests/lib/Security/CryptoTest.php b/tests/lib/Security/CryptoTest.php
index a2c8055750b..5e079c8018f 100644
--- a/tests/lib/Security/CryptoTest.php
+++ b/tests/lib/Security/CryptoTest.php
@@ -14,11 +14,11 @@ class CryptoTest extends \Test\TestCase {
public function defaultEncryptionProvider()
{
- return array(
- array('Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.'),
- array(''),
- array('我看这本书。 我看這本書')
- );
+ return [
+ ['Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.'],
+ [''],
+ ['我看这本书。 我看這本書']
+ ];
}
/** @var Crypto */
diff --git a/tests/lib/Security/SecureRandomTest.php b/tests/lib/Security/SecureRandomTest.php
index 71839115a3c..6898c1d8b0f 100644
--- a/tests/lib/Security/SecureRandomTest.php
+++ b/tests/lib/Security/SecureRandomTest.php
@@ -13,23 +13,23 @@ use OC\Security\SecureRandom;
class SecureRandomTest extends \Test\TestCase {
public function stringGenerationProvider() {
- return array(
- array(0, 0),
- array(1, 1),
- array(128, 128),
- array(256, 256),
- array(1024, 1024),
- array(2048, 2048),
- array(64000, 64000),
- );
+ return [
+ [0, 0],
+ [1, 1],
+ [128, 128],
+ [256, 256],
+ [1024, 1024],
+ [2048, 2048],
+ [64000, 64000],
+ ];
}
public static function charCombinations() {
- return array(
- array('CHAR_LOWER', '[a-z]'),
- array('CHAR_UPPER', '[A-Z]'),
- array('CHAR_DIGITS', '[0-9]'),
- );
+ return [
+ ['CHAR_LOWER', '[a-z]'],
+ ['CHAR_UPPER', '[A-Z]'],
+ ['CHAR_DIGITS', '[0-9]'],
+ ];
}
/** @var SecureRandom */