diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-11 21:32:18 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-12 13:55:19 +0200 |
commit | 234b510652d117bb3ef9ef3b6315db3a2c2eb91b (patch) | |
tree | 880cec2bf4fe4846eff9fa5aa68d2671fb0495be /tests/lib/Authentication/Token | |
parent | 138f47a1b980aaceb116b256b8ccf14f523e7e67 (diff) | |
download | nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.tar.gz nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.zip |
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/lib/Authentication/Token')
4 files changed, 27 insertions, 27 deletions
diff --git a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php index 855e90ab6b9..6fdf5b9060e 100644 --- a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php @@ -145,7 +145,7 @@ class DefaultTokenMapperTest extends TestCase { $this->assertEquals($token, $dbToken); } - + public function testGetInvalidToken() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); @@ -175,14 +175,14 @@ class DefaultTokenMapperTest extends TestCase { $this->assertEquals($token, $dbToken); } - + public function testGetTokenByIdNotFound() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); $this->mapper->getTokenById(-1); } - + public function testGetInvalidTokenById() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); @@ -200,7 +200,7 @@ class DefaultTokenMapperTest extends TestCase { } public function testDeleteById() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $qb = $this->dbConnection->getQueryBuilder(); $qb->select('id') diff --git a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php index d95e4c0418d..00b7f0dee03 100644 --- a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php @@ -38,17 +38,17 @@ use Test\TestCase; class DefaultTokenProviderTest extends TestCase { - /** @var DefaultTokenProvider|\PHPUnit_Framework_MockObject_MockObject */ + /** @var DefaultTokenProvider|\PHPUnit\Framework\MockObject\MockObject */ private $tokenProvider; - /** @var DefaultTokenMapper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var DefaultTokenMapper|\PHPUnit\Framework\MockObject\MockObject */ private $mapper; - /** @var ICrypto|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ICrypto|\PHPUnit\Framework\MockObject\MockObject */ private $crypto; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; /** @var int */ private $time; @@ -131,7 +131,7 @@ class DefaultTokenProviderTest extends TestCase { $this->tokenProvider->updateTokenActivity($tk); } - + public function testGetTokenByUser() { $this->mapper->expects($this->once()) ->method('getTokenByUser') @@ -159,7 +159,7 @@ class DefaultTokenProviderTest extends TestCase { $this->assertEquals('passme', $actual); } - + public function testGetPasswordPasswordLessToken() { $this->expectException(\OC\Authentication\Exceptions\PasswordlessTokenException::class); @@ -170,7 +170,7 @@ class DefaultTokenProviderTest extends TestCase { $this->tokenProvider->getPassword($tk, $token); } - + public function testGetPasswordDeletesInvalidToken() { $this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class); @@ -222,7 +222,7 @@ class DefaultTokenProviderTest extends TestCase { $this->assertEquals('encryptedpassword', $token->getPassword()); } - + public function testSetPasswordInvalidToken() { $this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class); diff --git a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php index 5ba7fe7c40e..2f2af38851d 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php @@ -172,7 +172,7 @@ class PublicKeyTokenMapperTest extends TestCase { $this->assertEquals($token, $dbToken); } - + public function testGetInvalidToken() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); @@ -204,14 +204,14 @@ class PublicKeyTokenMapperTest extends TestCase { $this->assertEquals($token, $dbToken); } - + public function testGetTokenByIdNotFound() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); $this->mapper->getTokenById(-1); } - + public function testGetInvalidTokenById() { $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); @@ -229,7 +229,7 @@ class PublicKeyTokenMapperTest extends TestCase { } public function testDeleteById() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $qb = $this->dbConnection->getQueryBuilder(); $qb->select('id') @@ -243,7 +243,7 @@ class PublicKeyTokenMapperTest extends TestCase { } public function testDeleteByIdWrongUser() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */ + /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */ $user = $this->createMock(IUser::class); $id = 33; diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php index 43ae0e9542c..c16ee7b818e 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php @@ -39,17 +39,17 @@ use Test\TestCase; class PublicKeyTokenProviderTest extends TestCase { - /** @var PublicKeyTokenProvider|\PHPUnit_Framework_MockObject_MockObject */ + /** @var PublicKeyTokenProvider|\PHPUnit\Framework\MockObject\MockObject */ private $tokenProvider; - /** @var PublicKeyTokenMapper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var PublicKeyTokenMapper|\PHPUnit\Framework\MockObject\MockObject */ private $mapper; /** @var ICrypto */ private $crypto; - /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; - /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ private $logger; - /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; /** @var int */ private $time; @@ -145,7 +145,7 @@ class PublicKeyTokenProviderTest extends TestCase { $this->assertSame($password, $this->tokenProvider->getPassword($actual, $token)); } - + public function testGetPasswordPasswordLessToken() { $this->expectException(\OC\Authentication\Exceptions\PasswordlessTokenException::class); @@ -156,7 +156,7 @@ class PublicKeyTokenProviderTest extends TestCase { $this->tokenProvider->getPassword($tk, $token); } - + public function testGetPasswordInvalidToken() { $this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class); @@ -205,7 +205,7 @@ class PublicKeyTokenProviderTest extends TestCase { $this->assertSame($newpass, $this->tokenProvider->getPassword($actual, 'token')); } - + public function testSetPasswordInvalidToken() { $this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class); |