Fix getMock ManagerTest

This commit is contained in:
Roeland Jago Douma 2016-09-12 20:59:01 +02:00
parent 77779d678f
commit 16e88a7ebf
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with 5 additions and 4 deletions

View File

@ -3,6 +3,7 @@
namespace Test\Comments;
use OCP\Comments\ICommentsManager;
use OCP\IUser;
use Test\TestCase;
/**
@ -561,7 +562,7 @@ class ManagerTest extends TestCase {
}
public function testSetMarkRead() {
$user = $this->getMock('\OCP\IUser');
$user = $this->createMock(IUser::class);
$user->expects($this->any())
->method('getUID')
->will($this->returnValue('alice'));
@ -577,7 +578,7 @@ class ManagerTest extends TestCase {
}
public function testSetMarkReadUpdate() {
$user = $this->getMock('\OCP\IUser');
$user = $this->createMock(IUser::class);
$user->expects($this->any())
->method('getUID')
->will($this->returnValue('alice'));
@ -596,7 +597,7 @@ class ManagerTest extends TestCase {
}
public function testReadMarkDeleteUser() {
$user = $this->getMock('\OCP\IUser');
$user = $this->createMock(IUser::class);
$user->expects($this->any())
->method('getUID')
->will($this->returnValue('alice'));
@ -613,7 +614,7 @@ class ManagerTest extends TestCase {
}
public function testReadMarkDeleteObject() {
$user = $this->getMock('\OCP\IUser');
$user = $this->createMock(IUser::class);
$user->expects($this->any())
->method('getUID')
->will($this->returnValue('alice'));