diff --git a/tests/lib/Cache/FileCacheTest.php b/tests/lib/Cache/FileCacheTest.php index d2725bf903..a90fc6678e 100644 --- a/tests/lib/Cache/FileCacheTest.php +++ b/tests/lib/Cache/FileCacheTest.php @@ -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');