aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Session
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Session')
-rw-r--r--tests/lib/Session/CryptoSessionDataTest.php9
-rw-r--r--tests/lib/Session/CryptoWrappingTest.php6
-rw-r--r--tests/lib/Session/MemoryTest.php7
3 files changed, 15 insertions, 7 deletions
diff --git a/tests/lib/Session/CryptoSessionDataTest.php b/tests/lib/Session/CryptoSessionDataTest.php
index 6c1536f4769..a30a3297094 100644
--- a/tests/lib/Session/CryptoSessionDataTest.php
+++ b/tests/lib/Session/CryptoSessionDataTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -8,19 +9,21 @@
namespace Test\Session;
use OC\Session\CryptoSessionData;
+use OC\Session\Memory;
+use OCP\ISession;
use OCP\Security\ICrypto;
class CryptoSessionDataTest extends Session {
- /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\Security\ICrypto */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ICrypto */
protected $crypto;
- /** @var \OCP\ISession */
+ /** @var ISession */
protected $wrappedSession;
protected function setUp(): void {
parent::setUp();
- $this->wrappedSession = new \OC\Session\Memory();
+ $this->wrappedSession = new Memory();
$this->crypto = $this->createMock(ICrypto::class);
$this->crypto->expects($this->any())
->method('encrypt')
diff --git a/tests/lib/Session/CryptoWrappingTest.php b/tests/lib/Session/CryptoWrappingTest.php
index 8afbf61bddc..2bc09e0903a 100644
--- a/tests/lib/Session/CryptoWrappingTest.php
+++ b/tests/lib/Session/CryptoWrappingTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -9,13 +10,14 @@ namespace Test\Session;
use OC\Session\CryptoSessionData;
use OCP\ISession;
+use OCP\Security\ICrypto;
use Test\TestCase;
class CryptoWrappingTest extends TestCase {
- /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\Security\ICrypto */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ICrypto */
protected $crypto;
- /** @var \PHPUnit\Framework\MockObject\MockObject|\OCP\ISession */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|ISession */
protected $wrappedSession;
/** @var \OC\Session\CryptoSessionData */
diff --git a/tests/lib/Session/MemoryTest.php b/tests/lib/Session/MemoryTest.php
index 24bfc06b274..40977f1f3fb 100644
--- a/tests/lib/Session/MemoryTest.php
+++ b/tests/lib/Session/MemoryTest.php
@@ -8,15 +8,18 @@
namespace Test\Session;
+use OC\Session\Memory;
+use OCP\Session\Exceptions\SessionNotAvailableException;
+
class MemoryTest extends Session {
protected function setUp(): void {
parent::setUp();
- $this->instance = new \OC\Session\Memory();
+ $this->instance = new Memory();
}
public function testThrowsExceptionOnGetId(): void {
- $this->expectException(\OCP\Session\Exceptions\SessionNotAvailableException::class);
+ $this->expectException(SessionNotAvailableException::class);
$this->instance->getId();
}