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

Fix test warnings
This commit is contained in:
Roeland Jago Douma 2017-10-15 21:40:43 +02:00 committed by GitHub
commit a0823540b0
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);