diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-09-12 21:40:00 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-09-13 09:09:53 +0200 |
commit | 2f36bbecb81081f3f509d6eeaf78ece240dbb0c0 (patch) | |
tree | 8e980b3ff8fb7e4bf413dcf0bafb79bd86c80466 /tests/lib | |
parent | 1d166d645b5867e8a73def1f25bef7d522efd482 (diff) | |
download | nextcloud-server-2f36bbecb81081f3f509d6eeaf78ece240dbb0c0.tar.gz nextcloud-server-2f36bbecb81081f3f509d6eeaf78ece240dbb0c0.zip |
Fix getMock TagTest
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/TagsTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/TagsTest.php b/tests/lib/TagsTest.php index 2662c209d2c..add28a19061 100644 --- a/tests/lib/TagsTest.php +++ b/tests/lib/TagsTest.php @@ -21,6 +21,7 @@ */ namespace Test; +use OCP\IUserSession; /** * Class TagsTest @@ -49,7 +50,7 @@ class TagsTest extends \Test\TestCase { \OC::$server->getUserManager()->createUser($userId, 'pass'); \OC_User::setUserId($userId); $this->user = new \OC\User\User($userId, null); - $this->userSession = $this->getMock('\OCP\IUserSession'); + $this->userSession = $this->createMock(IUserSession::class); $this->userSession ->expects($this->any()) ->method('getUser') @@ -70,7 +71,7 @@ class TagsTest extends \Test\TestCase { } public function testTagManagerWithoutUserReturnsNull() { - $this->userSession = $this->getMock('\OCP\IUserSession'); + $this->userSession = $this->createMock(IUserSession::class); $this->userSession ->expects($this->any()) ->method('getUser') @@ -294,7 +295,7 @@ class TagsTest extends \Test\TestCase { $otherUserId = $this->getUniqueID('user2_'); \OC::$server->getUserManager()->createUser($otherUserId, 'pass'); \OC_User::setUserId($otherUserId); - $otherUserSession = $this->getMock('\OCP\IUserSession'); + $otherUserSession = $this->createMock(IUserSession::class); $otherUserSession ->expects($this->any()) ->method('getUser') |