From 9404c04512332f5037dc4ccc4b5c43b5ba1a66e4 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 12 Sep 2016 20:54:21 +0200 Subject: [PATCH] Fix getMock AppTests --- tests/lib/AppTest.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/lib/AppTest.php b/tests/lib/AppTest.php index 64311f6e4a..ac4fb913be 100644 --- a/tests/lib/AppTest.php +++ b/tests/lib/AppTest.php @@ -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;