diff options
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Authentication/Token/RemoteWipeTest.php | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/lib/Authentication/Token/RemoteWipeTest.php b/tests/lib/Authentication/Token/RemoteWipeTest.php index 2ca49d36159..2d887a0a870 100644 --- a/tests/lib/Authentication/Token/RemoteWipeTest.php +++ b/tests/lib/Authentication/Token/RemoteWipeTest.php @@ -67,30 +67,20 @@ class RemoteWipeTest extends TestCase { public function testMarkNonWipableTokenForWipe(): void { $token = $this->createMock(IToken::class); - $this->tokenProvider->expects($this->once()) - ->method('getTokenById') - ->with(123) - ->willReturn($token); - - $result = $this->remoteWipe->markTokenForWipe(123); - + $result = $this->remoteWipe->markTokenForWipe($token); $this->assertFalse($result); } public function testMarkTokenForWipe(): void { $token = $this->createMock(IWipeableToken::class); - $this->tokenProvider->expects($this->once()) - ->method('getTokenById') - ->with(123) - ->willReturn($token); $token->expects($this->once()) ->method('wipe'); + $this->tokenProvider->expects($this->once()) ->method('updateToken') ->with($token); - $result = $this->remoteWipe->markTokenForWipe(123); - + $result = $this->remoteWipe->markTokenForWipe($token); $this->assertTrue($result); } |