Browse Source

Move files_trashbin to PSR-4 (#24570)

tags/v9.1.0beta1
Joas Schilling 8 years ago
parent
commit
d5dee80580

+ 1
- 0
apps/files_trashbin/appinfo/info.xml View File

@@ -14,6 +14,7 @@ To prevent a user from running out of disk space, the ownCloud Deleted files app
<types>
<filesystem/>
</types>
<namespace>Files_Trashbin</namespace>
<dependencies>
<owncloud min-version="9.1" max-version="9.1" />
</dependencies>

apps/files_trashbin/appinfo/application.php → apps/files_trashbin/lib/AppInfo/Application.php View File


apps/files_trashbin/lib/backgroundjob/expiretrash.php → apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php View File


apps/files_trashbin/lib/capabilities.php → apps/files_trashbin/lib/Capabilities.php View File


apps/files_trashbin/command/cleanup.php → apps/files_trashbin/lib/Command/CleanUp.php View File


apps/files_trashbin/command/expire.php → apps/files_trashbin/lib/Command/Expire.php View File


apps/files_trashbin/lib/exceptions/copyrecursiveexception.php → apps/files_trashbin/lib/Exceptions/CopyRecursiveException.php View File


apps/files_trashbin/lib/expiration.php → apps/files_trashbin/lib/Expiration.php View File


apps/files_trashbin/lib/helper.php → apps/files_trashbin/lib/Helper.php View File


apps/files_trashbin/lib/hooks.php → apps/files_trashbin/lib/Hooks.php View File


apps/files_trashbin/lib/storage.php → apps/files_trashbin/lib/Storage.php View File


apps/files_trashbin/lib/trashbin.php → apps/files_trashbin/lib/Trashbin.php View File


apps/files_trashbin/tests/backgroundjob/expiretrash.php → apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php View File

@@ -19,11 +19,11 @@
*
*/

namespace OCA\Files_Trashbin\Tests\BackgroundJob\ExpireTrash;
namespace OCA\Files_Trashbin\Tests\BackgroundJob;
use \OCA\Files_Trashbin\BackgroundJob\ExpireTrash;

class ExpireTrash_Test extends \Test\TestCase {
class ExpireTrashTest extends \Test\TestCase {
public function testConstructAndRun() {
$backgroundJob = new ExpireTrash(
$this->getMock('OCP\IUserManager'),

apps/files_trashbin/tests/command/cleanuptest.php → apps/files_trashbin/tests/Command/CleanUpTest.php View File


apps/files_trashbin/tests/command/expiretest.php → apps/files_trashbin/tests/Command/ExpireTest.php View File


apps/files_trashbin/tests/expiration.php → apps/files_trashbin/tests/ExpirationTest.php View File

@@ -20,9 +20,10 @@
*
*/

use \OCA\Files_Trashbin\Expiration;
use OCA\Files_Trashbin\Expiration;
use \OCA\Files_Trashbin\Tests;

class Expiration_Test extends \PHPUnit_Framework_TestCase {
class ExpirationTest extends \Test\TestCase {
const SECONDS_PER_DAY = 86400; //60*60*24

const FAKE_TIME_NOW = 1000000;

apps/files_trashbin/tests/storage.php → apps/files_trashbin/tests/StorageTest.php View File

@@ -24,7 +24,7 @@
*
*/

namespace OCA\Files_trashbin\Tests\Storage;
namespace OCA\Files_Trashbin\Tests;

use OC\Files\Storage\Temporary;
use OC\Files\Filesystem;
@@ -34,9 +34,9 @@ use OC\Files\Filesystem;
*
* @group DB
*
* @package OCA\Files_trashbin\Tests\Storage
* @package OCA\Files_Trashbin\Tests
*/
class Storage extends \Test\TestCase {
class StorageTest extends \Test\TestCase {
/**
* @var string
*/

apps/files_trashbin/tests/trashbin.php → apps/files_trashbin/tests/TrashbinTest.php View File

@@ -26,14 +26,14 @@
*
*/

use OCA\Files_Trashbin;
use OCA\Files_Trashbin\Tests;

/**
* Class Test_Encryption
*
* @group DB
*/
class Test_Trashbin extends \Test\TestCase {
class TrashbinTest extends \Test\TestCase {

const TEST_TRASHBIN_USER1 = "test-trashbin-user1";
const TEST_TRASHBIN_USER2 = "test-trashbin-user2";
@@ -74,11 +74,11 @@ class Test_Trashbin extends \Test\TestCase {

$config = \OC::$server->getConfig();
//configure trashbin
self::$rememberRetentionObligation = $config->getSystemValue('trashbin_retention_obligation', Files_Trashbin\Expiration::DEFAULT_RETENTION_OBLIGATION);
self::$rememberRetentionObligation = $config->getSystemValue('trashbin_retention_obligation', \OCA\Files_Trashbin\Expiration::DEFAULT_RETENTION_OBLIGATION);
$config->setSystemValue('trashbin_retention_obligation', 'auto, 2');

// register hooks
Files_Trashbin\Trashbin::registerHooks();
\OCA\Files_Trashbin\Trashbin::registerHooks();

// create test user
self::loginHelper(self::TEST_TRASHBIN_USER2, true);
@@ -675,7 +675,7 @@ class Test_Trashbin extends \Test\TestCase {


// just a dummy class to make protected methods available for testing
class TrashbinForTesting extends Files_Trashbin\Trashbin {
class TrashbinForTesting extends \OCA\Files_Trashbin\Trashbin {

/**
* @param OCP\Files\FileInfo[] $files
@@ -683,7 +683,7 @@ class TrashbinForTesting extends Files_Trashbin\Trashbin {
*/
public function dummyDeleteExpiredFiles($files, $limit) {
// dummy value for $retention_obligation because it is not needed here
return parent::deleteExpiredFiles($files, \Test_Trashbin::TEST_TRASHBIN_USER1, $limit, 0);
return parent::deleteExpiredFiles($files, TrashbinTest::TEST_TRASHBIN_USER1, $limit, 0);
}

/**
@@ -691,6 +691,6 @@ class TrashbinForTesting extends Files_Trashbin\Trashbin {
* @param integer $availableSpace
*/
public function dummyDeleteFiles($files, $availableSpace) {
return parent::deleteFiles($files, \Test_Trashbin::TEST_TRASHBIN_USER1, $availableSpace);
return parent::deleteFiles($files, TrashbinTest::TEST_TRASHBIN_USER1, $availableSpace);
}
}

Loading…
Cancel
Save