Skip to content

Commit 7c93d5a

Browse files
committed
Change JtiReplayDetectorTest to adhere to linting rules.
1 parent 572e241 commit 7c93d5a

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

solid/tests/Unit/JtiReplayDetectorTest.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@
88
use OCP\DB\QueryBuilder\IQueryBuilder;
99
use OCP\DB\IResult;
1010
use PHPUnit\Framework\TestCase;
11-
require_once __DIR__.'/../../lib/JtiReplayDetector.php';
1211

13-
class JtiReplayDetectorTest extends TestCase {
12+
class JtiReplayDetectorTest extends TestCase
13+
{
14+
public static function setUpBeforeClass(): void
15+
{
16+
require_once __DIR__.'/../../lib/JtiReplayDetector.php';
17+
}
1418

15-
private function createMocks($result) {
19+
private function createMocks($result)
20+
{
1621
$mockIDBConnection = $this->createMock(IDBConnection::class);
1722
$mockQueryBuilder = $this->createMock(IQueryBuilder::class);
1823
$mockExpr = $this->createMock(IExpressionBuilder::class);
@@ -62,7 +67,8 @@ private function createMocks($result) {
6267
return $mockIDBConnection;
6368
}
6469

65-
public function testJtiDetected() {
70+
public function testJtiDetected(): void
71+
{
6672
$dateInterval = new DateInterval('PT90S');
6773
$mockIDBConnection = $this->createMocks(true);
6874

@@ -75,7 +81,8 @@ public function testJtiDetected() {
7581
$this->assertTrue($result);
7682
}
7783

78-
public function testJtiNotDetected() {
84+
public function testJtiNotDetected(): void
85+
{
7986
$dateInterval = new DateInterval('PT90S');
8087
$mockIDBConnection = $this->createMocks(false);
8188

0 commit comments

Comments
 (0)