Fix getMock AppTests

This commit is contained in:
Roeland Jago Douma 2016-09-12 20:54:21 +02:00
parent feb85981cd
commit 9404c04512
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with 6 additions and 7 deletions

View File

@ -8,6 +8,7 @@
*/
namespace Test;
use OC\AppConfig;
use OCP\IAppConfig;
/**
@ -476,13 +477,11 @@ class AppTest extends \Test\TestCase {
private function setupAppConfigMock() {
$appConfig = $this->getMock(
'\OC\AppConfig',
array('getValues'),
array(\OC::$server->getDatabaseConnection()),
'',
false
);
$appConfig = $this->getMockBuilder(AppConfig::class)
->setMethods(['getValues'])
->setConstructorArgs([\OC::$server->getDatabaseConnection()])
->disableOriginalConstructor()
->getMock();
$this->registerAppConfig($appConfig);
return $appConfig;