Fix getMock UtilTest

This commit is contained in:
Roeland Jago Douma 2016-09-12 22:13:31 +02:00
parent 206b48d250
commit 368f407698
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with 8 additions and 1 deletions

View File

@ -9,7 +9,14 @@
namespace Test;
use OC_Util;
use OCP\App\IAppManager;
/**
* Class UtilTest
*
* @package Test
* @group DB
*/
class UtilTest extends \Test\TestCase {
public function testGetVersion() {
$version = \OCP\Util::getVersion();
@ -300,7 +307,7 @@ class UtilTest extends \Test\TestCase {
$oldWebRoot = \OC::$WEBROOT;
\OC::$WEBROOT = '';
$appManager = $this->getMock('\OCP\App\IAppManager');
$appManager = $this->createMock(IAppManager::class);
$appManager->expects($this->any())
->method('isEnabledForUser')
->will($this->returnCallback(function($appId) use ($enabledApps){