diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2016-05-12 09:48:53 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-05-12 09:48:53 +0200 |
commit | d5dee805806c1af5774040e3a1f40e7d1914758e (patch) | |
tree | 4d4a7da9dead751f52c3cb92927bbdf52a0ef7e3 | |
parent | 56f4c4bed98eef9e422e7283e9c77cce15c312fd (diff) | |
download | nextcloud-server-d5dee805806c1af5774040e3a1f40e7d1914758e.tar.gz nextcloud-server-d5dee805806c1af5774040e3a1f40e7d1914758e.zip |
Move files_trashbin to PSR-4 (#24570)
-rw-r--r-- | apps/files_trashbin/appinfo/info.xml | 1 | ||||
-rw-r--r-- | apps/files_trashbin/lib/AppInfo/Application.php (renamed from apps/files_trashbin/appinfo/application.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php (renamed from apps/files_trashbin/lib/backgroundjob/expiretrash.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Capabilities.php (renamed from apps/files_trashbin/lib/capabilities.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Command/CleanUp.php (renamed from apps/files_trashbin/command/cleanup.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Command/Expire.php (renamed from apps/files_trashbin/command/expire.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Exceptions/CopyRecursiveException.php (renamed from apps/files_trashbin/lib/exceptions/copyrecursiveexception.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Expiration.php (renamed from apps/files_trashbin/lib/expiration.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Helper.php (renamed from apps/files_trashbin/lib/helper.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Hooks.php (renamed from apps/files_trashbin/lib/hooks.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Storage.php (renamed from apps/files_trashbin/lib/storage.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Trashbin.php (renamed from apps/files_trashbin/lib/trashbin.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php (renamed from apps/files_trashbin/tests/backgroundjob/expiretrash.php) | 4 | ||||
-rw-r--r-- | apps/files_trashbin/tests/Command/CleanUpTest.php (renamed from apps/files_trashbin/tests/command/cleanuptest.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/tests/Command/ExpireTest.php (renamed from apps/files_trashbin/tests/command/expiretest.php) | 0 | ||||
-rw-r--r-- | apps/files_trashbin/tests/ExpirationTest.php (renamed from apps/files_trashbin/tests/expiration.php) | 5 | ||||
-rw-r--r-- | apps/files_trashbin/tests/StorageTest.php (renamed from apps/files_trashbin/tests/storage.php) | 6 | ||||
-rw-r--r-- | apps/files_trashbin/tests/TrashbinTest.php (renamed from apps/files_trashbin/tests/trashbin.php) | 14 |
18 files changed, 16 insertions, 14 deletions
diff --git a/apps/files_trashbin/appinfo/info.xml b/apps/files_trashbin/appinfo/info.xml index c3c29f2297b..52b00d90ff6 100644 --- a/apps/files_trashbin/appinfo/info.xml +++ b/apps/files_trashbin/appinfo/info.xml @@ -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> diff --git a/apps/files_trashbin/appinfo/application.php b/apps/files_trashbin/lib/AppInfo/Application.php index 841c9d90f1b..841c9d90f1b 100644 --- a/apps/files_trashbin/appinfo/application.php +++ b/apps/files_trashbin/lib/AppInfo/Application.php diff --git a/apps/files_trashbin/lib/backgroundjob/expiretrash.php b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php index 8a4e2d41fec..8a4e2d41fec 100644 --- a/apps/files_trashbin/lib/backgroundjob/expiretrash.php +++ b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php diff --git a/apps/files_trashbin/lib/capabilities.php b/apps/files_trashbin/lib/Capabilities.php index 43daa8cfa47..43daa8cfa47 100644 --- a/apps/files_trashbin/lib/capabilities.php +++ b/apps/files_trashbin/lib/Capabilities.php diff --git a/apps/files_trashbin/command/cleanup.php b/apps/files_trashbin/lib/Command/CleanUp.php index cffe7f7d1dd..cffe7f7d1dd 100644 --- a/apps/files_trashbin/command/cleanup.php +++ b/apps/files_trashbin/lib/Command/CleanUp.php diff --git a/apps/files_trashbin/command/expire.php b/apps/files_trashbin/lib/Command/Expire.php index 9e0f58e12ce..9e0f58e12ce 100644 --- a/apps/files_trashbin/command/expire.php +++ b/apps/files_trashbin/lib/Command/Expire.php diff --git a/apps/files_trashbin/lib/exceptions/copyrecursiveexception.php b/apps/files_trashbin/lib/Exceptions/CopyRecursiveException.php index 8ebc8dfbfe1..8ebc8dfbfe1 100644 --- a/apps/files_trashbin/lib/exceptions/copyrecursiveexception.php +++ b/apps/files_trashbin/lib/Exceptions/CopyRecursiveException.php diff --git a/apps/files_trashbin/lib/expiration.php b/apps/files_trashbin/lib/Expiration.php index e5a37b88b49..e5a37b88b49 100644 --- a/apps/files_trashbin/lib/expiration.php +++ b/apps/files_trashbin/lib/Expiration.php diff --git a/apps/files_trashbin/lib/helper.php b/apps/files_trashbin/lib/Helper.php index 815522a909e..815522a909e 100644 --- a/apps/files_trashbin/lib/helper.php +++ b/apps/files_trashbin/lib/Helper.php diff --git a/apps/files_trashbin/lib/hooks.php b/apps/files_trashbin/lib/Hooks.php index 89063bcb33e..89063bcb33e 100644 --- a/apps/files_trashbin/lib/hooks.php +++ b/apps/files_trashbin/lib/Hooks.php diff --git a/apps/files_trashbin/lib/storage.php b/apps/files_trashbin/lib/Storage.php index c4c523810ac..c4c523810ac 100644 --- a/apps/files_trashbin/lib/storage.php +++ b/apps/files_trashbin/lib/Storage.php diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/Trashbin.php index 52692950a65..52692950a65 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php diff --git a/apps/files_trashbin/tests/backgroundjob/expiretrash.php b/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php index c98a555c929..0d4d95ac298 100644 --- a/apps/files_trashbin/tests/backgroundjob/expiretrash.php +++ b/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php @@ -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'), diff --git a/apps/files_trashbin/tests/command/cleanuptest.php b/apps/files_trashbin/tests/Command/CleanUpTest.php index d71c4ecd85d..d71c4ecd85d 100644 --- a/apps/files_trashbin/tests/command/cleanuptest.php +++ b/apps/files_trashbin/tests/Command/CleanUpTest.php diff --git a/apps/files_trashbin/tests/command/expiretest.php b/apps/files_trashbin/tests/Command/ExpireTest.php index e481e29330f..e481e29330f 100644 --- a/apps/files_trashbin/tests/command/expiretest.php +++ b/apps/files_trashbin/tests/Command/ExpireTest.php diff --git a/apps/files_trashbin/tests/expiration.php b/apps/files_trashbin/tests/ExpirationTest.php index 420d255947e..246409e24f4 100644 --- a/apps/files_trashbin/tests/expiration.php +++ b/apps/files_trashbin/tests/ExpirationTest.php @@ -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; diff --git a/apps/files_trashbin/tests/storage.php b/apps/files_trashbin/tests/StorageTest.php index 5c631770da3..1ba80caf183 100644 --- a/apps/files_trashbin/tests/storage.php +++ b/apps/files_trashbin/tests/StorageTest.php @@ -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 */ diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/TrashbinTest.php index 7087da37266..98d55020dce 100644 --- a/apps/files_trashbin/tests/trashbin.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -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); } } |