summaryrefslogtreecommitdiffstats
path: root/tests/Core/Command/User/LastSeenTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Core/Command/User/LastSeenTest.php')
-rw-r--r--tests/Core/Command/User/LastSeenTest.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/Core/Command/User/LastSeenTest.php b/tests/Core/Command/User/LastSeenTest.php
index 84805f5c072..cceefb98810 100644
--- a/tests/Core/Command/User/LastSeenTest.php
+++ b/tests/Core/Command/User/LastSeenTest.php
@@ -23,6 +23,10 @@ namespace Tests\Core\Command\User;
use OC\Core\Command\User\LastSeen;
+use OCP\IUser;
+use OCP\IUserManager;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
use Test\TestCase;
class LastSeenTest extends TestCase {
@@ -39,11 +43,11 @@ class LastSeenTest extends TestCase {
protected function setUp() {
parent::setUp();
- $userManager = $this->userManager = $this->getMockBuilder('OCP\IUserManager')
+ $userManager = $this->userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
- $this->consoleInput = $this->getMock('Symfony\Component\Console\Input\InputInterface');
- $this->consoleOutput = $this->getMock('Symfony\Component\Console\Output\OutputInterface');
+ $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock();
+ $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock();
/** @var \OCP\IUserManager $userManager */
$this->command = new LastSeen($userManager);
@@ -63,7 +67,7 @@ class LastSeenTest extends TestCase {
* @param string $expectedString
*/
public function testValidUser($lastSeen, $expectedString) {
- $user = $this->getMock('OCP\IUser');
+ $user = $this->getMockBuilder(IUser::class)->getMock();
$user->expects($this->once())
->method('getLastLogin')
->willReturn($lastSeen);