Don't use deprecated $this->getMock() method

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-10-09 13:00:24 +02:00
parent dbaad22472
commit 281f042093
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 2 additions and 2 deletions

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