summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-06-20 09:17:19 +0200
committerChristoph Wurst <christoph@owncloud.com>2016-06-20 09:17:19 +0200
commit5c680848232439588a536cef02a5cc85aa994819 (patch)
tree09aed7b09036ba51bfb56da011701b1cf61adf5e
parent9d74ff02a4014d11020e21e5f73beb02bc749697 (diff)
downloadnextcloud-server-5c680848232439588a536cef02a5cc85aa994819.tar.gz
nextcloud-server-5c680848232439588a536cef02a5cc85aa994819.zip
fix default token provider tests
-rw-r--r--tests/lib/Authentication/Token/DefaultTokenProviderTest.php26
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
index 86f4842bbc3..d0bb38e6bb1 100644
--- a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
+++ b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
@@ -218,30 +218,4 @@ class DefaultTokenProviderTest extends TestCase {
$this->tokenProvider->invalidateOldTokens();
}
- public function testValidateToken() {
- $token = 'sometoken';
- $dbToken = new DefaultToken();
- $this->mapper->expects($this->once())
- ->method('getToken')
- ->with(hash('sha512', $token))
- ->will($this->returnValue($dbToken));
-
- $actual = $this->tokenProvider->validateToken($token);
-
- $this->assertEquals($dbToken, $actual);
- }
-
- /**
- * @expectedException \OC\Authentication\Exceptions\InvalidTokenException
- */
- public function testValidateInvalidToken() {
- $token = 'sometoken';
- $this->mapper->expects($this->once())
- ->method('getToken')
- ->with(hash('sha512', $token))
- ->will($this->throwException(new DoesNotExistException('')));
-
- $this->tokenProvider->validateToken($token);
- }
-
}