Skip to content
Snippets Groups Projects
Commit a0823540 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #6791 from nextcloud/fix-test-warnings

Fix test warnings
parents 3438020d 281f0420
No related branches found
No related tags found
No related merge requests found
...@@ -134,7 +134,7 @@ class CalDavBackendTest extends AbstractCalDavBackend { ...@@ -134,7 +134,7 @@ class CalDavBackendTest extends AbstractCalDavBackend {
->method('userExists') ->method('userExists')
->willReturn(true); ->willReturn(true);
$this->userManager->expects($this->any()) $this->groupManager->expects($this->any())
->method('groupExists') ->method('groupExists')
->willReturn(true); ->willReturn(true);
......
...@@ -530,7 +530,7 @@ class StorageTest extends \Test\TestCase { ...@@ -530,7 +530,7 @@ class StorageTest extends \Test\TestCase {
*/ */
public function testShouldMoveToTrash($mountPoint, $path, $userExists, $appDisablesTrash, $expected) { public function testShouldMoveToTrash($mountPoint, $path, $userExists, $appDisablesTrash, $expected) {
$fileID = 1; $fileID = 1;
$cache = $this->getMock(ICache::class); $cache = $this->createMock(ICache::class);
$cache->expects($this->any())->method('getId')->willReturn($fileID); $cache->expects($this->any())->method('getId')->willReturn($fileID);
$tmpStorage = $this->getMockBuilder('\OC\Files\Storage\Temporary') $tmpStorage = $this->getMockBuilder('\OC\Files\Storage\Temporary')
->disableOriginalConstructor()->getMock($cache); ->disableOriginalConstructor()->getMock($cache);
...@@ -542,7 +542,7 @@ class StorageTest extends \Test\TestCase { ...@@ -542,7 +542,7 @@ class StorageTest extends \Test\TestCase {
$logger = $this->getMockBuilder(ILogger::class)->getMock(); $logger = $this->getMockBuilder(ILogger::class)->getMock();
$eventDispatcher = $this->getMockBuilder(EventDispatcher::class) $eventDispatcher = $this->getMockBuilder(EventDispatcher::class)
->disableOriginalConstructor()->getMock(); ->disableOriginalConstructor()->getMock();
$rootFolder = $this->getMock(IRootFolder::class); $rootFolder = $this->createMock(IRootFolder::class);
$node = $this->getMockBuilder(Node::class)->disableOriginalConstructor()->getMock(); $node = $this->getMockBuilder(Node::class)->disableOriginalConstructor()->getMock();
$event = $this->getMockBuilder(MoveToTrashEvent::class)->disableOriginalConstructor()->getMock(); $event = $this->getMockBuilder(MoveToTrashEvent::class)->disableOriginalConstructor()->getMock();
$event->expects($this->any())->method('shouldMoveToTrashBin')->willReturn(!$appDisablesTrash); $event->expects($this->any())->method('shouldMoveToTrashBin')->willReturn(!$appDisablesTrash);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment