88use OCP \DB \QueryBuilder \IQueryBuilder ;
99use OCP \DB \IResult ;
1010use 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