aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests/Crypto/CryptTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /apps/encryption/tests/Crypto/CryptTest.php
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
downloadnextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.tar.gz
nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.zip
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/encryption/tests/Crypto/CryptTest.php')
-rw-r--r--apps/encryption/tests/Crypto/CryptTest.php11
1 files changed, 0 insertions, 11 deletions
diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php
index dd892616d0f..6f7b0cc2765 100644
--- a/apps/encryption/tests/Crypto/CryptTest.php
+++ b/apps/encryption/tests/Crypto/CryptTest.php
@@ -76,7 +76,6 @@ class CryptTest extends TestCase {
* test getOpenSSLConfig without any additional parameters
*/
public function testGetOpenSSLConfigBasic() {
-
$this->config->expects($this->once())
->method('getSystemValue')
->with($this->equalTo('openssl'), $this->equalTo([]))
@@ -92,7 +91,6 @@ class CryptTest extends TestCase {
* test getOpenSSLConfig with additional parameters defined in config.php
*/
public function testGetOpenSSLConfig() {
-
$this->config->expects($this->once())
->method('getSystemValue')
->with($this->equalTo('openssl'), $this->equalTo([]))
@@ -113,7 +111,6 @@ class CryptTest extends TestCase {
* @dataProvider dataTestGenerateHeader
*/
public function testGenerateHeader($keyFormat, $expected) {
-
$this->config->expects($this->once())
->method('getSystemValue')
->with($this->equalTo('cipher'), $this->equalTo('AES-256-CTR'))
@@ -176,7 +173,6 @@ class CryptTest extends TestCase {
$this->assertSame($expected,
$this->crypt->getCipher()
);
-
}
/**
@@ -199,7 +195,6 @@ class CryptTest extends TestCase {
* test concatIV()
*/
public function testConcatIV() {
-
$result = self::invokePrivate(
$this->crypt,
'concatIV',
@@ -305,7 +300,6 @@ class CryptTest extends TestCase {
* test parseHeader()
*/
public function testParseHeader() {
-
$header= 'HBEGIN:foo:bar:cipher:AES-256-CFB:HEND';
$result = self::invokePrivate($this->crypt, 'parseHeader', [$header]);
@@ -323,7 +317,6 @@ class CryptTest extends TestCase {
* @return string
*/
public function testEncrypt() {
-
$decrypted = 'content';
$password = 'password';
$iv = self::invokePrivate($this->crypt, 'generateIv');
@@ -340,7 +333,6 @@ class CryptTest extends TestCase {
'iv' => $iv,
'encrypted' => $result,
'decrypted' => $decrypted];
-
}
/**
@@ -349,14 +341,12 @@ class CryptTest extends TestCase {
* @depends testEncrypt
*/
public function testDecrypt($data) {
-
$result = self::invokePrivate(
$this->crypt,
'decrypt',
[$data['encrypted'], $data['iv'], $data['password']]);
$this->assertSame($data['decrypted'], $result);
-
}
/**
@@ -461,5 +451,4 @@ class CryptTest extends TestCase {
$this->invokePrivate($this->crypt, 'isValidPrivateKey', ['foo'])
);
}
-
}