Browse Source

Fix tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/7849/head
Roeland Jago Douma 8 years ago
committed by Morris Jobke
parent
commit
6e1ee1e7a7
No known key found for this signature in database GPG Key ID: FE03C3A163FEDE68
  1. 4
      apps/federatedfilesharing/tests/TokenHandlerTest.php
  2. 3
      lib/private/Security/SecureRandom.php
  3. 3
      lib/public/Security/ISecureRandom.php

4
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());
}

3
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;

3
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;
/**

Loading…
Cancel
Save