diff options
Diffstat (limited to 'tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php')
-rw-r--r-- | tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php b/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php index c9082c08b30..b8074d75b30 100644 --- a/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php @@ -23,6 +23,8 @@ namespace Test\Authentication\Token; use OC\Authentication\Token\DefaultTokenCleanupJob; +use OC\Authentication\Token\IProvider; +use OC\Authentication\Token\Manager; use Test\TestCase; class DefaultTokenCleanupJobTest extends TestCase { @@ -34,19 +36,13 @@ class DefaultTokenCleanupJobTest extends TestCase { protected function setUp() { parent::setUp(); - $this->tokenProvider = $this->getMockBuilder('\OC\Authentication\Token\DefaultTokenProvider') + $this->tokenProvider = $this->getMockBuilder(Manager::class) ->disableOriginalConstructor() ->getMock(); - $this->overwriteService('\OC\Authentication\Token\DefaultTokenProvider', $this->tokenProvider); + $this->overwriteService(IProvider::class, $this->tokenProvider); $this->job = new DefaultTokenCleanupJob(); } - protected function tearDown() { - parent::tearDown(); - - $this->restoreService('\OC\Authentication\Token\DefaultTokenProvider'); - } - public function testRun() { $this->tokenProvider->expects($this->once()) ->method('invalidateOldTokens') |