aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php')
-rw-r--r--tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php
index f8386124626..2b2c4af0444 100644
--- a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php
+++ b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php
@@ -10,10 +10,11 @@ declare(strict_types=1);
namespace Test\Security\CSRF\TokenStorage;
+use OC\Security\CSRF\TokenStorage\SessionStorage;
use OCP\ISession;
class SessionStorageTest extends \Test\TestCase {
- /** @var \OCP\ISession */
+ /** @var ISession */
private $session;
/** @var \OC\Security\CSRF\TokenStorage\SessionStorage */
private $sessionStorage;
@@ -22,13 +23,13 @@ class SessionStorageTest extends \Test\TestCase {
parent::setUp();
$this->session = $this->getMockBuilder(ISession::class)
->disableOriginalConstructor()->getMock();
- $this->sessionStorage = new \OC\Security\CSRF\TokenStorage\SessionStorage($this->session);
+ $this->sessionStorage = new SessionStorage($this->session);
}
/**
* @return array
*/
- public function getTokenDataProvider() {
+ public static function getTokenDataProvider(): array {
return [
[
'',
@@ -41,9 +42,9 @@ class SessionStorageTest extends \Test\TestCase {
/**
* @param string $token
- * @dataProvider getTokenDataProvider
*
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('getTokenDataProvider')]
public function testGetTokenWithEmptyToken($token): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Session does not contain a requesttoken');