diff options
author | Joas Schilling <coding@schilljs.com> | 2020-03-16 10:52:46 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-03-25 18:50:12 +0300 |
commit | 5aa47e554966d2453e88bfe8f4332aea1c6cd873 (patch) | |
tree | 5118cc46ea9f1a4ac710c11453eccce8a18d97f0 /tests | |
parent | 87a91e6a4d560279b648167bcb2d3d5b6a2723d7 (diff) |
Check the user on remote wipe
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-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); } |