summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Collaboration/Collaborators/UserPluginTest.php4
-rw-r--r--tests/lib/Session/CryptoSessionDataTest.php8
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/lib/Collaboration/Collaborators/UserPluginTest.php b/tests/lib/Collaboration/Collaborators/UserPluginTest.php
index b9f10a54fa0..57b9cbde856 100644
--- a/tests/lib/Collaboration/Collaborators/UserPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/UserPluginTest.php
@@ -414,8 +414,8 @@ class UserPluginTest extends TestCase {
$this->groupManager->expects($this->exactly(2))
->method('getUserGroupIds')
->withConsecutive(
- $this->user,
- $singleUser
+ [$this->user],
+ [$singleUser]
)
->willReturn($groupResponse);
} else {
diff --git a/tests/lib/Session/CryptoSessionDataTest.php b/tests/lib/Session/CryptoSessionDataTest.php
index 472856b90d9..6de44032530 100644
--- a/tests/lib/Session/CryptoSessionDataTest.php
+++ b/tests/lib/Session/CryptoSessionDataTest.php
@@ -22,6 +22,7 @@
namespace Test\Session;
use OC\Session\CryptoSessionData;
+use OCP\Security\ICrypto;
class CryptoSessionDataTest extends Session {
/** @var \PHPUnit_Framework_MockObject_MockObject|\OCP\Security\ICrypto */
@@ -34,9 +35,7 @@ class CryptoSessionDataTest extends Session {
parent::setUp();
$this->wrappedSession = new \OC\Session\Memory($this->getUniqueID());
- $this->crypto = $this->getMockBuilder('OCP\Security\ICrypto')
- ->disableOriginalConstructor()
- ->getMock();
+ $this->crypto = $this->createMock(ICrypto::class);
$this->crypto->expects($this->any())
->method('encrypt')
->willReturnCallback(function ($input) {
@@ -45,6 +44,9 @@ class CryptoSessionDataTest extends Session {
$this->crypto->expects($this->any())
->method('decrypt')
->willReturnCallback(function ($input) {
+ if ($input === '') {
+ return '';
+ }
return substr($input, 1, -1);
});