nextcloud/apps/files_external/tests/dropbox.php

31 lines
830 B
PHP
Raw Normal View History

2012-10-06 15:43:34 +04:00
<?php
/**
* Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
2012-10-08 16:31:13 +04:00
namespace Test\Files\Storage;
2012-10-06 15:43:34 +04:00
$config=include('files_external/tests/config.php');
if(!is_array($config) or !isset($config['dropbox']) or !$config['dropbox']['run']) {
2012-10-08 16:31:13 +04:00
abstract class Dropbox extends Storage{}
2012-10-06 15:43:34 +04:00
return;
}else{
2012-10-08 16:31:13 +04:00
class Dropbox extends Storage {
2012-10-06 15:43:34 +04:00
private $config;
public function setUp() {
$id=uniqid();
$this->config=include('files_external/tests/config.php');
$this->config['dropbox']['root'].='/'.$id;//make sure we have an new empty folder to work in
2012-10-08 16:31:13 +04:00
$this->instance=new \OC\Files\Storage\Dropbox($this->config['dropbox']);
2012-10-06 15:43:34 +04:00
}
public function tearDown() {
$this->instance->unlink('/');
}
}
}