summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-09-12 21:27:54 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-09-13 09:09:52 +0200
commitd277053f2235d33ae94da507de7244b9c33a6ae9 (patch)
tree0e6d0813a2911cbde5bcab0dcab2e2a8b849ab8a
parentfe15dccb457d7b9264608d59c88d7bca72cc3579 (diff)
downloadnextcloud-server-d277053f2235d33ae94da507de7244b9c33a6ae9.tar.gz
nextcloud-server-d277053f2235d33ae94da507de7244b9c33a6ae9.zip
Fix getMock QuotaTest
-rw-r--r--tests/lib/Files/Storage/Wrapper/QuotaTest.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php
index 2e9f68b3c56..ee01d0c3f26 100644
--- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php
+++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.php
@@ -10,6 +10,7 @@ namespace Test\Files\Storage\Wrapper;
//ensure the constants are loaded
use OC\Files\Cache\CacheEntry;
+use OC\Files\Storage\Local;
\OC::$loader->load('\OC\Files\Filesystem');
@@ -75,11 +76,10 @@ class QuotaTest extends \Test\Files\Storage\Storage {
}
public function testFreeSpaceWithUnknownDiskSpace() {
- $storage = $this->getMock(
- '\OC\Files\Storage\Local',
- array('free_space'),
- array(array('datadir' => $this->tmpDir))
- );
+ $storage = $this->getMockBuilder(Local::class)
+ ->setMethods(['free_space'])
+ ->setConstructorArgs([['datadir' => $this->tmpDir]])
+ ->getMock();
$storage->expects($this->any())
->method('free_space')
->will($this->returnValue(-2));
@@ -132,10 +132,10 @@ class QuotaTest extends \Test\Files\Storage\Storage {
}
public function testReturnFalseWhenFopenFailed() {
- $failStorage = $this->getMock(
- '\OC\Files\Storage\Local',
- array('fopen'),
- array(array('datadir' => $this->tmpDir)));
+ $failStorage = $this->getMockBuilder(Local::class)
+ ->setMethods(['fopen'])
+ ->setConstructorArgs([['datadir' => $this->tmpDir]])
+ ->getMock();
$failStorage->expects($this->any())
->method('fopen')
->will($this->returnValue(false));