remove unnecessary require calls - the ownCloud class loader is supposed to take care of this

This commit is contained in:
Thomas Müller 2014-10-30 17:20:40 +01:00
parent 90e523ead0
commit f776bcd4a0
33 changed files with 57 additions and 128 deletions

View File

@ -6,8 +6,6 @@
* See the COPYING-README file.
*/
require_once __DIR__ . '/../lib/helper.php';
use OCA\Files;
/**

View File

@ -7,16 +7,6 @@
* See the COPYING-README file.
*/
require_once __DIR__ . '/../../../lib/base.php';
require_once __DIR__ . '/../lib/crypt.php';
require_once __DIR__ . '/../lib/keymanager.php';
require_once __DIR__ . '/../lib/proxy.php';
require_once __DIR__ . '/../lib/stream.php';
require_once __DIR__ . '/../lib/util.php';
require_once __DIR__ . '/../lib/helper.php';
require_once __DIR__ . '/../appinfo/app.php';
require_once __DIR__ . '/util.php';
use OCA\Encryption;
/**

View File

@ -6,8 +6,6 @@
* See the COPYING-README file.
*/
require_once __DIR__ . '/../lib/helper.php';
require_once __DIR__ . '/util.php';
use OCA\Encryption;

View File

@ -20,12 +20,6 @@
*
*/
require_once __DIR__ . '/../../../lib/base.php';
require_once __DIR__ . '/../lib/crypt.php';
require_once __DIR__ . '/../lib/keymanager.php';
require_once __DIR__ . '/../lib/stream.php';
require_once __DIR__ . '/../lib/util.php';
require_once __DIR__ . '/../appinfo/app.php';
require_once __DIR__ . '/util.php';
use OCA\Encryption;

View File

@ -6,14 +6,6 @@
* See the COPYING-README file.
*/
require_once __DIR__ . '/../../../lib/base.php';
require_once __DIR__ . '/../lib/crypt.php';
require_once __DIR__ . '/../lib/keymanager.php';
require_once __DIR__ . '/../lib/proxy.php';
require_once __DIR__ . '/../lib/stream.php';
require_once __DIR__ . '/../lib/util.php';
require_once __DIR__ . '/../lib/helper.php';
require_once __DIR__ . '/../appinfo/app.php';
require_once __DIR__ . '/util.php';
use OCA\Encryption;

View File

@ -20,13 +20,6 @@
*
*/
require_once __DIR__ . '/../../../lib/base.php';
require_once __DIR__ . '/../lib/crypt.php';
require_once __DIR__ . '/../lib/keymanager.php';
require_once __DIR__ . '/../lib/proxy.php';
require_once __DIR__ . '/../lib/stream.php';
require_once __DIR__ . '/../lib/util.php';
require_once __DIR__ . '/../appinfo/app.php';
require_once __DIR__ . '/util.php';
use OCA\Encryption;

View File

@ -20,14 +20,6 @@
*
*/
require_once __DIR__ . '/../../../lib/base.php';
require_once __DIR__ . '/../lib/crypt.php';
require_once __DIR__ . '/../lib/keymanager.php';
require_once __DIR__ . '/../lib/proxy.php';
require_once __DIR__ . '/../lib/stream.php';
require_once __DIR__ . '/../lib/util.php';
require_once __DIR__ . '/../lib/helper.php';
require_once __DIR__ . '/../appinfo/app.php';
require_once __DIR__ . '/util.php';
use OCA\Encryption;

View File

@ -20,13 +20,6 @@
*
*/
require_once __DIR__ . '/../../../lib/base.php';
require_once __DIR__ . '/../lib/crypt.php';
require_once __DIR__ . '/../lib/keymanager.php';
require_once __DIR__ . '/../lib/proxy.php';
require_once __DIR__ . '/../lib/stream.php';
require_once __DIR__ . '/../lib/util.php';
require_once __DIR__ . '/../appinfo/app.php';
require_once __DIR__ . '/util.php';
use OCA\Encryption;

View File

@ -20,14 +20,6 @@
*
*/
require_once __DIR__ . '/../../../lib/base.php';
require_once __DIR__ . '/../lib/crypt.php';
require_once __DIR__ . '/../lib/keymanager.php';
require_once __DIR__ . '/../lib/proxy.php';
require_once __DIR__ . '/../lib/stream.php';
require_once __DIR__ . '/../lib/util.php';
require_once __DIR__ . '/../appinfo/app.php';
require_once __DIR__ . '/../../files_trashbin/appinfo/app.php';
require_once __DIR__ . '/util.php';
use OCA\Encryption;

View File

@ -6,14 +6,6 @@
* See the COPYING-README file.
*/
require_once __DIR__ . '/../../../lib/base.php';
require_once __DIR__ . '/../lib/crypt.php';
require_once __DIR__ . '/../lib/keymanager.php';
require_once __DIR__ . '/../lib/proxy.php';
require_once __DIR__ . '/../lib/stream.php';
require_once __DIR__ . '/../lib/util.php';
require_once __DIR__ . '/../appinfo/app.php';
use OCA\Encryption;
/**

View File

@ -20,13 +20,6 @@
*
*/
require_once __DIR__ . '/../../../lib/base.php';
require_once __DIR__ . '/../lib/crypt.php';
require_once __DIR__ . '/../lib/keymanager.php';
require_once __DIR__ . '/../lib/proxy.php';
require_once __DIR__ . '/../lib/stream.php';
require_once __DIR__ . '/../lib/util.php';
require_once __DIR__ . '/../appinfo/app.php';
require_once __DIR__ . '/util.php';
use OCA\Encryption;

View File

@ -20,14 +20,13 @@
*
*/
require_once __DIR__ . '/base.php';
use OCA\Files\Share;
use OCA\Files_sharing\Tests\TestCase;
/**
* Class Test_Files_Sharing_Api
*/
class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
class Test_Files_Sharing_Api extends TestCase {
const TEST_FOLDER_NAME = '/folder_share_api_test';

View File

@ -20,14 +20,13 @@
*
*/
require_once __DIR__ . '/base.php';
use OCA\Files\Share;
use OCA\Files_sharing\Tests\TestCase;
/**
* Class Test_Files_Sharing
*/
class Test_Files_Sharing_Backend extends Test_Files_Sharing_Base {
class Test_Files_Sharing_Backend extends TestCase {
const TEST_FOLDER_NAME = '/folder_share_api_test';

View File

@ -1,4 +1,6 @@
<?php
use OCA\Files_sharing\Tests\TestCase;
/**
* ownCloud
*
@ -20,9 +22,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
require_once __DIR__ . '/base.php';
class Test_Files_Sharing_Cache extends Test_Files_Sharing_Base {
class Test_Files_Sharing_Cache extends TestCase {
/**
* @var OC\Files\View

View File

@ -20,8 +20,6 @@
*
*/
require_once __DIR__ . '/base.php';
/**
* Tests for the external Storage class for remote shares.
*/

View File

@ -1,4 +1,6 @@
<?php
use OCA\Files_sharing\Tests\TestCase;
/**
* ownCloud
*
@ -19,9 +21,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
require_once __DIR__ . '/base.php';
class Test_Files_Sharing_Helper extends Test_Files_Sharing_Base {
class Test_Files_Sharing_Helper extends TestCase {
/**
* test set and get share folder

View File

@ -23,9 +23,8 @@ use OC\Files\Cache\Cache;
use OC\Files\Storage\Storage;
use OC\Files\View;
require_once __DIR__ . '/base.php';
class Test_Files_Sharing_Permissions extends Test_Files_Sharing_Base {
class Test_Files_Sharing_Permissions extends OCA\Files_sharing\Tests\TestCase {
/**
* @var Storage

View File

@ -20,14 +20,13 @@
*
*/
require_once __DIR__ . '/base.php';
use OCA\Files\Share;
/**
* Class Test_Files_Sharing_Proxy
*/
class Test_Files_Sharing_Proxy extends Test_Files_Sharing_Base {
class Test_Files_Sharing_Proxy extends OCA\Files_sharing\Tests\TestCase {
const TEST_FOLDER_NAME = '/folder_share_api_test';

View File

@ -20,14 +20,12 @@
*
*/
require_once __DIR__ . '/base.php';
use OCA\Files\Share;
/**
* Class Test_Files_Sharing
*/
class Test_Files_Sharing extends Test_Files_Sharing_Base {
class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
const TEST_FOLDER_NAME = '/folder_share_api_test';

View File

@ -20,12 +20,10 @@
*
*/
require_once __DIR__ . '/base.php';
/**
* Class Test_Files_Sharing_Api
*/
class Test_Files_Sharing_Mount extends Test_Files_Sharing_Base {
class Test_Files_Sharing_Mount extends OCA\Files_sharing\Tests\TestCase {
function setUp() {
parent::setUp();

View File

@ -20,14 +20,12 @@
*
*/
require_once __DIR__ . '/base.php';
use OCA\Files\Share;
/**
* Class Test_Files_Sharing_Api
*/
class Test_Files_Sharing_Storage extends Test_Files_Sharing_Base {
class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase {
function setUp() {
parent::setUp();

View File

@ -20,7 +20,7 @@
*
*/
require_once __DIR__ . '/../../../lib/base.php';
namespace OCA\Files_Sharing\Tests;
use OCA\Files\Share;
@ -29,7 +29,7 @@ use OCA\Files\Share;
*
* Base class for sharing tests.
*/
abstract class Test_Files_Sharing_Base extends \PHPUnit_Framework_TestCase {
abstract class TestCase extends \PHPUnit_Framework_TestCase {
const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
@ -41,7 +41,7 @@ abstract class Test_Files_Sharing_Base extends \PHPUnit_Framework_TestCase {
public $filename;
public $data;
/**
* @var OC\Files\View
* @var \OC\Files\View
*/
public $view;
public $folder;

View File

@ -22,12 +22,11 @@
*/
require_once __DIR__ . '/../appinfo/update.php';
require_once __DIR__ . '/base.php';
/**
* Class Test_Files_Sharing_Update
*/
class Test_Files_Sharing_Update_Routine extends Test_Files_Sharing_Base {
class Test_Files_Sharing_Update_Routine extends OCA\Files_Sharing\Tests\TestCase {
const TEST_FOLDER_NAME = '/folder_share_api_test';

View File

@ -21,12 +21,11 @@
*/
require_once __DIR__ . '/../appinfo/update.php';
require_once __DIR__ . '/base.php';
/**
* Class Test_Files_Sharing_Updater
*/
class Test_Files_Sharing_Updater extends Test_Files_Sharing_Base {
class Test_Files_Sharing_Updater extends OCA\Files_sharing\Tests\TestCase {
const TEST_FOLDER_NAME = '/folder_share_updater_test';

View File

@ -19,9 +19,28 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
require_once __DIR__ . '/base.php';
class Test_Files_Sharing_Watcher extends Test_Files_Sharing_Base {
class Test_Files_Sharing_Watcher extends OCA\Files_sharing\Tests\TestCase {
/**
* @var \OC\Files\Storage\Storage
*/
private $ownerStorage;
/**
* @var \OC\Files\Cache\Cache
*/
private $ownerCache;
/**
* @var \OC\Files\Storage\Storage
*/
private $sharedStorage;
/**
* @var \OC\Files\Cache\Cache
*/
private $sharedCache;
function setUp() {
parent::setUp();

View File

@ -20,8 +20,6 @@
*
*/
require_once __DIR__ . '/../../../lib/base.php';
use OCA\Files_Trashbin;
/**

View File

@ -32,6 +32,9 @@ class Test_Files_Versioning extends \PHPUnit_Framework_TestCase {
const TEST_VERSIONS_USER = 'test-versions-user';
const USERS_VERSIONS_ROOT = '/test-versions-user/files_versions';
/**
* @var \OC\Files\View
*/
private $rootView;
public static function setUpBeforeClass() {
@ -63,7 +66,7 @@ class Test_Files_Versioning extends \PHPUnit_Framework_TestCase {
*/
function testGetExpireList($versions, $sizeOfAllDeletedFiles) {
// last interval enda at 2592000
// last interval end at 2592000
$startTime = 5000000;
$testClass = new VersionStorageToTest();

View File

@ -25,14 +25,16 @@
namespace OCP\AppFramework\Http;
//require_once(__DIR__ . "/../classloader.php");
class ChildDownloadResponse extends DownloadResponse {
class ChildDownloadResponse extends DownloadResponse {};
};
class DownloadResponseTest extends \PHPUnit_Framework_TestCase {
/**
* @var ChildDownloadResponse
*/
protected $response;
protected function setUp(){

View File

@ -26,13 +26,14 @@ namespace OC\AppFramework\Http;
use OC\AppFramework\Http;
//require_once(__DIR__ . "/../classloader.php");
class HttpTest extends \PHPUnit_Framework_TestCase {
private $server;
/**
* @var Http
*/
private $http;
protected function setUp(){

View File

@ -30,10 +30,6 @@ namespace OC\AppFramework\Http;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http;
//require_once(__DIR__ . "/../classloader.php");
class JSONResponseTest extends \PHPUnit_Framework_TestCase {
/**

View File

@ -26,13 +26,12 @@ namespace OCP\AppFramework\Http;
use OCP\AppFramework\Http;
//require_once(__DIR__ . "/../classloader.php");
class RedirectResponseTest extends \PHPUnit_Framework_TestCase {
/**
* @var RedirectResponse
*/
protected $response;
protected function setUp(){

View File

@ -6,8 +6,6 @@
* See the COPYING-README file.
*/
require_once 'archive.php';
class Test_Archive_TAR extends Test_Archive {
public function setUp() {
if (OC_Util::runningOnWindows()) {

View File

@ -6,8 +6,6 @@
* See the COPYING-README file.
*/
require_once 'archive.php';
if (!OC_Util::runningOnWindows()) {
class Test_Archive_ZIP extends Test_Archive {
protected function getExisting() {