Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_antivirus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-02-03 15:41:19 +0300
committerRobin Appelman <robin@icewind.nl>2017-02-07 16:50:00 +0300
commitdea71bff6b0e3fcb9e806885d03cde8318b36e11 (patch)
tree85b8b8642276a540acaa191e0ecc72d15c7bc6ab /tests
parentfd729058b152750da4b73ac94568505748769bc9 (diff)
make antivirus tests pass with nc12
Also includes some minor cleanups
Diffstat (limited to 'tests')
-rw-r--r--tests/TestBase.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/TestBase.php b/tests/TestBase.php
index 08ef6fd..57cfbd1 100644
--- a/tests/TestBase.php
+++ b/tests/TestBase.php
@@ -9,6 +9,7 @@
namespace OCA\Files_antivirus\Tests;
+use OCA\Files_Antivirus\AppConfig;
use OCA\Files_Antivirus\AppInfo\Application;
abstract class TestBase extends \PHPUnit_Framework_TestCase {
@@ -16,20 +17,21 @@ abstract class TestBase extends \PHPUnit_Framework_TestCase {
protected $db;
protected $application;
protected $container;
+ /** @var AppConfig|\PHPUnit_Framework_MockObject_MockObject */
protected $config;
protected $l10n;
public function setUp(){
parent::setUp();
- \OC_App::enable('files_antivirus');
+ \OC_App::loadApp('files_antivirus');
- $this->db = \OC::$server->getDb();
+ $this->db = \OC::$server->getDatabaseConnection();
$this->application = new Application();
$this->container = $this->application->getContainer();
- $this->config = $this->getMockBuilder('\OCA\Files_Antivirus\AppConfig')
+ $this->config = $this->getMockBuilder(AppConfig::class)
->disableOriginalConstructor()
->getMock()
;