Fix getMock UtilTest
This commit is contained in:
parent
206b48d250
commit
368f407698
|
@ -9,7 +9,14 @@
|
||||||
namespace Test;
|
namespace Test;
|
||||||
|
|
||||||
use OC_Util;
|
use OC_Util;
|
||||||
|
use OCP\App\IAppManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class UtilTest
|
||||||
|
*
|
||||||
|
* @package Test
|
||||||
|
* @group DB
|
||||||
|
*/
|
||||||
class UtilTest extends \Test\TestCase {
|
class UtilTest extends \Test\TestCase {
|
||||||
public function testGetVersion() {
|
public function testGetVersion() {
|
||||||
$version = \OCP\Util::getVersion();
|
$version = \OCP\Util::getVersion();
|
||||||
|
@ -300,7 +307,7 @@ class UtilTest extends \Test\TestCase {
|
||||||
$oldWebRoot = \OC::$WEBROOT;
|
$oldWebRoot = \OC::$WEBROOT;
|
||||||
\OC::$WEBROOT = '';
|
\OC::$WEBROOT = '';
|
||||||
|
|
||||||
$appManager = $this->getMock('\OCP\App\IAppManager');
|
$appManager = $this->createMock(IAppManager::class);
|
||||||
$appManager->expects($this->any())
|
$appManager->expects($this->any())
|
||||||
->method('isEnabledForUser')
|
->method('isEnabledForUser')
|
||||||
->will($this->returnCallback(function($appId) use ($enabledApps){
|
->will($this->returnCallback(function($appId) use ($enabledApps){
|
||||||
|
|
Loading…
Reference in New Issue