Fix getMock FileCacheTest

This commit is contained in:
Roeland Jago Douma 2016-09-12 20:57:45 +02:00
parent c4ef825ceb
commit 77779d678f
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with 5 additions and 5 deletions

View File

@ -21,6 +21,7 @@
*/
namespace Test\Cache;
use OC\Files\Storage\Local;
/**
* Class FileCacheTest
@ -102,11 +103,10 @@ class FileCacheTest extends TestCache {
}
private function setupMockStorage() {
$mockStorage = $this->getMock(
'\OC\Files\Storage\Local',
['filemtime', 'unlink'],
[['datadir' => \OC::$server->getTempManager()->getTemporaryFolder()]]
);
$mockStorage = $this->getMockBuilder(Local::class)
->setMethods(['filemtime', 'unlink'])
->setConstructorArgs([['datadir' => \OC::$server->getTempManager()->getTemporaryFolder()]])
->getMock();
\OC\Files\Filesystem::mount($mockStorage, array(), '/test/cache');