Fix checker test
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
This commit is contained in:
parent
5fc0477483
commit
7cb6265378
|
@ -32,6 +32,7 @@ use OC\IntegrityCheck\Helpers\AppLocator;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\ICacheFactory;
|
use OCP\ICacheFactory;
|
||||||
use OCP\App\IAppManager;
|
use OCP\App\IAppManager;
|
||||||
|
use OCP\Files\IMimeTypeDetector;
|
||||||
|
|
||||||
class CheckerTest extends TestCase {
|
class CheckerTest extends TestCase {
|
||||||
/** @var EnvironmentHelper|\PHPUnit_Framework_MockObject_MockObject */
|
/** @var EnvironmentHelper|\PHPUnit_Framework_MockObject_MockObject */
|
||||||
|
@ -48,6 +49,8 @@ class CheckerTest extends TestCase {
|
||||||
private $cacheFactory;
|
private $cacheFactory;
|
||||||
/** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
|
/** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
|
||||||
private $appManager;
|
private $appManager;
|
||||||
|
/** @var IMimeTypeDetector|\PHPUnit_Framework_MockObject_MockObject */
|
||||||
|
private $mimeTypeDetector;
|
||||||
|
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
@ -57,6 +60,7 @@ class CheckerTest extends TestCase {
|
||||||
$this->config = $this->createMock(IConfig::class);
|
$this->config = $this->createMock(IConfig::class);
|
||||||
$this->cacheFactory = $this->createMock(ICacheFactory::class);
|
$this->cacheFactory = $this->createMock(ICacheFactory::class);
|
||||||
$this->appManager = $this->createMock(IAppManager::class);
|
$this->appManager = $this->createMock(IAppManager::class);
|
||||||
|
$this->mimeTypeDetector = $this->createMock(IMimeTypeDetector::class);
|
||||||
|
|
||||||
$this->config->method('getAppValue')
|
$this->config->method('getAppValue')
|
||||||
->will($this->returnArgument(2));
|
->will($this->returnArgument(2));
|
||||||
|
@ -74,7 +78,8 @@ class CheckerTest extends TestCase {
|
||||||
$this->config,
|
$this->config,
|
||||||
$this->cacheFactory,
|
$this->cacheFactory,
|
||||||
$this->appManager,
|
$this->appManager,
|
||||||
\OC::$server->getTempManager()
|
\OC::$server->getTempManager(),
|
||||||
|
$this->mimeTypeDetector
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1014,7 +1019,8 @@ class CheckerTest extends TestCase {
|
||||||
$this->config,
|
$this->config,
|
||||||
$this->cacheFactory,
|
$this->cacheFactory,
|
||||||
$this->appManager,
|
$this->appManager,
|
||||||
\OC::$server->getTempManager()
|
\OC::$server->getTempManager(),
|
||||||
|
$this->mimeTypeDetector,
|
||||||
])
|
])
|
||||||
->setMethods([
|
->setMethods([
|
||||||
'verifyCoreSignature',
|
'verifyCoreSignature',
|
||||||
|
|
Loading…
Reference in New Issue