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

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