From 133c438f6aad67974662a8b11e984caa11332bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 27 Apr 2026 10:40:02 +0200 Subject: [PATCH] chore: Adapt SessionTest to getToken being called twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- tests/lib/User/SessionTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index 5a8f67fd71d..d185a056af5 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -1,4 +1,5 @@ * This file is licensed under the Affero General Public License version 3 or @@ -9,8 +10,8 @@ namespace Test\User; use OC\AppFramework\Http\Request; -use OC\Authentication\Exceptions\InvalidTokenException; use OC\Authentication\Events\LoginFailed; +use OC\Authentication\Exceptions\InvalidTokenException; use OC\Authentication\Token\DefaultTokenMapper; use OC\Authentication\Token\DefaultTokenProvider; use OC\Authentication\Token\IProvider; @@ -1035,7 +1036,7 @@ class SessionTest extends \Test\TestCase { ->method('getHeader') ->with('Authorization') ->willReturn('Bearer xxxxx'); - $this->tokenProvider->expects($this->once()) + $this->tokenProvider->expects($this->atLeastOnce()) ->method('getToken') ->with('xxxxx') ->willReturn($token);