summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-01-14 11:33:53 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-14 21:04:52 +0100
commit6e1ee1e7a7aa6e52b922665b9466ce2db244ecb6 (patch)
treedb90c0eea1a7e39ac134aef019278181631b385d
parentde5d7aa3317c8547e1ad338613896001fe1aabaf (diff)
downloadnextcloud-server-6e1ee1e7a7aa6e52b922665b9466ce2db244ecb6.tar.gz
nextcloud-server-6e1ee1e7a7aa6e52b922665b9466ce2db244ecb6.zip
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--apps/federatedfilesharing/tests/TokenHandlerTest.php4
-rw-r--r--lib/private/Security/SecureRandom.php3
-rw-r--r--lib/public/Security/ISecureRandom.php3
3 files changed, 4 insertions, 6 deletions
diff --git a/apps/federatedfilesharing/tests/TokenHandlerTest.php b/apps/federatedfilesharing/tests/TokenHandlerTest.php
index aca6c3d26c1..d6f3f8fe5da 100644
--- a/apps/federatedfilesharing/tests/TokenHandlerTest.php
+++ b/apps/federatedfilesharing/tests/TokenHandlerTest.php
@@ -55,9 +55,9 @@ class TokenHandlerTest extends \Test\TestCase {
$this->expectedTokenLength,
ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS
)
- ->willReturn(true);
+ ->willReturn('mytoken');
- $this->assertTrue($this->tokenHandler->generateToken());
+ $this->assertSame('mytoken', $this->tokenHandler->generateToken());
}
diff --git a/lib/private/Security/SecureRandom.php b/lib/private/Security/SecureRandom.php
index b5270d08b46..75d9d02a1d3 100644
--- a/lib/private/Security/SecureRandom.php
+++ b/lib/private/Security/SecureRandom.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -21,8 +22,6 @@
*
*/
-declare(strict_types=1);
-
namespace OC\Security;
use OCP\Security\ISecureRandom;
diff --git a/lib/public/Security/ISecureRandom.php b/lib/public/Security/ISecureRandom.php
index 14976831a1a..235b3033c44 100644
--- a/lib/public/Security/ISecureRandom.php
+++ b/lib/public/Security/ISecureRandom.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -23,8 +24,6 @@
*
*/
-declare(strict_types=1);
-
namespace OCP\Security;
/**