Skip to content

Commit 23e02a9

Browse files
come-ncbackportbot[bot]
authored andcommitted
fix(tests): Fix BearerAuthTest
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent ff64f62 commit 23e02a9

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
*
2424
*/
25+
2526
namespace OCA\DAV\Tests\unit\Connector\Sabre;
2627

2728
use OCA\DAV\Connector\Sabre\BearerAuth;
@@ -66,12 +67,9 @@ public function testValidateBearerTokenNotLoggedIn(): void {
6667

6768
public function testValidateBearerToken(): void {
6869
$this->userSession
69-
->expects($this->exactly(2))
70-
->method('isLoggedIn')
71-
->willReturnOnConsecutiveCalls(
72-
false,
73-
true,
74-
);
70+
->expects($this->once())
71+
->method('tryTokenLogin')
72+
->willReturn(true);
7573
$user = $this->createMock(IUser::class);
7674
$user
7775
->expects($this->once())

0 commit comments

Comments
 (0)