Skip to content

Commit

Permalink
Disable proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
VicDeo committed Jan 12, 2015
1 parent ed1c890 commit 1449d7f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/scannertest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ class Test_Files_Antivirus_Scanner extends \PHPUnit_Framework_TestCase {
private $storage;

private $config = array();
private $proxies = array();

public function setUp() {
\OC_App::enable('files_antivirus');
$this->proxies = \OC_FileProxy::getProxies();
\OC_FileProxy::clearProxies();

\OC_User::clearBackends();
\OC_User::useBackend(new \OC_User_Dummy());
Expand All @@ -54,6 +57,10 @@ public function setUp() {
}

public function tearDown() {
foreach ($this->proxies as $proxy){
\OC_FileProxy::register($proxy);
}

if (!is_null($this->config['av_mode'])){
\OCP\Config::setAppValue('files_antivirus', 'av_mode', $this->config['av_mode']);
}
Expand Down

0 comments on commit 1449d7f

Please sign in to comment.