@@ -38,11 +38,11 @@ class CommentsNodeTest extends \Test\TestCase {
3838 public function setUp (): void {
3939 parent ::setUp ();
4040
41- $ this ->commentsManager = $ this ->createMock ('\OCP\Comments\ICommentsManager ' );
42- $ this ->comment = $ this ->createMock ('\OCP\Comments\IComment ' );
43- $ this ->userManager = $ this ->createMock ('\OCP\IUserManager ' );
44- $ this ->userSession = $ this ->createMock ('\OCP\IUserSession ' );
45- $ this ->logger = $ this ->createMock ('\OCP\ILogger ' );
41+ $ this ->commentsManager = $ this ->createMock ('\\' . \ OCP \Comments \ICommentsManager::class );
42+ $ this ->comment = $ this ->createMock ('\\' . \ OCP \Comments \IComment::class );
43+ $ this ->userManager = $ this ->createMock ('\\' . \ OCP \IUserManager::class );
44+ $ this ->userSession = $ this ->createMock ('\\' . \ OCP \IUserSession::class );
45+ $ this ->logger = $ this ->createMock ('\\' . \ OCP \ILogger::class );
4646
4747 $ this ->node = new CommentNode (
4848 $ this ->commentsManager ,
@@ -54,7 +54,7 @@ public function setUp(): void {
5454 }
5555
5656 public function testDelete () {
57- $ user = $ this ->createMock ('\OCP\IUser ' );
57+ $ user = $ this ->createMock ('\\' . \ OCP \IUser::class );
5858
5959 $ user ->expects ($ this ->once ())
6060 ->method ('getUID ' )
@@ -88,7 +88,7 @@ public function testDelete() {
8888 public function testDeleteForbidden () {
8989 $ this ->expectException (\Sabre \DAV \Exception \Forbidden::class);
9090
91- $ user = $ this ->createMock ('\OCP\IUser ' );
91+ $ user = $ this ->createMock ('\\' . \ OCP \IUser::class );
9292
9393 $ user ->expects ($ this ->once ())
9494 ->method ('getUID ' )
@@ -139,7 +139,7 @@ public function testGetLastModified() {
139139 public function testUpdateComment () {
140140 $ msg = 'Hello Earth ' ;
141141
142- $ user = $ this ->createMock ('\OCP\IUser ' );
142+ $ user = $ this ->createMock ('\\' . \ OCP \IUser::class );
143143
144144 $ user ->expects ($ this ->once ())
145145 ->method ('getUID ' )
@@ -176,7 +176,7 @@ public function testUpdateCommentLogException() {
176176
177177 $ msg = null ;
178178
179- $ user = $ this ->createMock ('\OCP\IUser ' );
179+ $ user = $ this ->createMock ('\\' . \ OCP \IUser::class );
180180
181181 $ user ->expects ($ this ->once ())
182182 ->method ('getUID ' )
@@ -214,7 +214,7 @@ public function testUpdateCommentMessageTooLongException() {
214214 $ this ->expectException (\Sabre \DAV \Exception \BadRequest::class);
215215 $ this ->expectExceptionMessage ('Message exceeds allowed character limit of ' );
216216
217- $ user = $ this ->createMock ('\OCP\IUser ' );
217+ $ user = $ this ->createMock ('\\' . \ OCP \IUser::class );
218218
219219 $ user ->expects ($ this ->once ())
220220 ->method ('getUID ' )
@@ -253,7 +253,7 @@ public function testUpdateForbiddenByUser() {
253253
254254 $ msg = 'HaXX0r ' ;
255255
256- $ user = $ this ->createMock ('\OCP\IUser ' );
256+ $ user = $ this ->createMock ('\\' . \ OCP \IUser::class );
257257
258258 $ user ->expects ($ this ->once ())
259259 ->method ('getUID ' )
@@ -287,7 +287,7 @@ public function testUpdateForbiddenByType() {
287287
288288 $ msg = 'HaXX0r ' ;
289289
290- $ user = $ this ->createMock ('\OCP\IUser ' );
290+ $ user = $ this ->createMock ('\\' . \ OCP \IUser::class );
291291
292292 $ user ->expects ($ this ->never ())
293293 ->method ('getUID ' );
@@ -334,7 +334,7 @@ public function testUpdateForbiddenByNotLoggedIn() {
334334 }
335335
336336 public function testPropPatch () {
337- $ propPatch = $ this ->getMockBuilder (' Sabre\DAV\PropPatch ' )
337+ $ propPatch = $ this ->getMockBuilder (\ Sabre \DAV \PropPatch::class )
338338 ->disableOriginalConstructor ()
339339 ->getMock ();
340340
@@ -412,7 +412,7 @@ public function testGetProperties() {
412412 ->method ('getObjectId ' )
413413 ->will ($ this ->returnValue ($ expected [$ ns . 'objectId ' ]));
414414
415- $ user = $ this ->getMockBuilder ('\OCP\IUser ' )
415+ $ user = $ this ->getMockBuilder ('\\' . \ OCP \IUser::class )
416416 ->disableOriginalConstructor ()
417417 ->getMock ();
418418 $ user ->expects ($ this ->once ())
@@ -463,7 +463,7 @@ public function testGetPropertiesUnreadProperty($creationDT, $readDT, $expected)
463463
464464 $ this ->userSession ->expects ($ this ->once ())
465465 ->method ('getUser ' )
466- ->will ($ this ->returnValue ($ this ->createMock ('\OCP\IUser ' )));
466+ ->will ($ this ->returnValue ($ this ->createMock ('\\' . \ OCP \IUser::class )));
467467
468468 $ properties = $ this ->node ->getProperties (null );
469469
0 commit comments