From dbaad22472a2ed9cd9033e3ef0a82b5f7530eec2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 9 Oct 2017 12:57:41 +0200 Subject: [PATCH 1/2] Fix tests with group manager Signed-off-by: Joas Schilling --- apps/dav/tests/unit/CalDAV/CalDavBackendTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php index 95ea09148b..50c8b39484 100644 --- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php @@ -134,7 +134,7 @@ class CalDavBackendTest extends AbstractCalDavBackend { ->method('userExists') ->willReturn(true); - $this->userManager->expects($this->any()) + $this->groupManager->expects($this->any()) ->method('groupExists') ->willReturn(true); From 281f0420938ad55234f17a3649b2eca218fca5a3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 9 Oct 2017 13:00:24 +0200 Subject: [PATCH 2/2] Don't use deprecated $this->getMock() method Signed-off-by: Joas Schilling --- apps/files_trashbin/tests/StorageTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_trashbin/tests/StorageTest.php b/apps/files_trashbin/tests/StorageTest.php index 2e3ddf2e6b..bdddafcf01 100644 --- a/apps/files_trashbin/tests/StorageTest.php +++ b/apps/files_trashbin/tests/StorageTest.php @@ -530,7 +530,7 @@ class StorageTest extends \Test\TestCase { */ public function testShouldMoveToTrash($mountPoint, $path, $userExists, $appDisablesTrash, $expected) { $fileID = 1; - $cache = $this->getMock(ICache::class); + $cache = $this->createMock(ICache::class); $cache->expects($this->any())->method('getId')->willReturn($fileID); $tmpStorage = $this->getMockBuilder('\OC\Files\Storage\Temporary') ->disableOriginalConstructor()->getMock($cache); @@ -542,7 +542,7 @@ class StorageTest extends \Test\TestCase { $logger = $this->getMockBuilder(ILogger::class)->getMock(); $eventDispatcher = $this->getMockBuilder(EventDispatcher::class) ->disableOriginalConstructor()->getMock(); - $rootFolder = $this->getMock(IRootFolder::class); + $rootFolder = $this->createMock(IRootFolder::class); $node = $this->getMockBuilder(Node::class)->disableOriginalConstructor()->getMock(); $event = $this->getMockBuilder(MoveToTrashEvent::class)->disableOriginalConstructor()->getMock(); $event->expects($this->any())->method('shouldMoveToTrashBin')->willReturn(!$appDisablesTrash);