diff options
Diffstat (limited to 'tests')
146 files changed, 174 insertions, 190 deletions
diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php index 4ecea745cfa..811b64029c6 100644 --- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php +++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php @@ -19,7 +19,6 @@ * */ - namespace Tests\Core\Command\Encryption; diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php index af97a4b4a79..508d5da95f7 100644 --- a/tests/Core/Command/Encryption/DecryptAllTest.php +++ b/tests/Core/Command/Encryption/DecryptAllTest.php @@ -19,7 +19,6 @@ * */ - namespace Tests\Core\Command\Encryption; diff --git a/tests/Core/Command/Encryption/EncryptAllTest.php b/tests/Core/Command/Encryption/EncryptAllTest.php index c6af7e38722..7fa4b5e5bbe 100644 --- a/tests/Core/Command/Encryption/EncryptAllTest.php +++ b/tests/Core/Command/Encryption/EncryptAllTest.php @@ -19,7 +19,6 @@ * */ - namespace Tests\Core\Command\Encryption; diff --git a/tests/Core/Command/Group/AddTest.php b/tests/Core/Command/Group/AddTest.php index 8aa2f040de1..c7010e53e58 100644 --- a/tests/Core/Command/Group/AddTest.php +++ b/tests/Core/Command/Group/AddTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Core\Command\Group; use OC\Core\Command\Group\Add; diff --git a/tests/Core/Command/Group/AddUserTest.php b/tests/Core/Command/Group/AddUserTest.php index af860e244d6..7660aad1192 100644 --- a/tests/Core/Command/Group/AddUserTest.php +++ b/tests/Core/Command/Group/AddUserTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Core\Command\Group; use OC\Core\Command\Group\AddUser; diff --git a/tests/Core/Command/Group/DeleteTest.php b/tests/Core/Command/Group/DeleteTest.php index 708e10b0581..f9b1cbbe3a8 100644 --- a/tests/Core/Command/Group/DeleteTest.php +++ b/tests/Core/Command/Group/DeleteTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Core\Command\Group; use OC\Core\Command\Group\Delete; diff --git a/tests/Core/Command/Group/ListCommandTest.php b/tests/Core/Command/Group/ListCommandTest.php index ac872e74ac8..ab089c93422 100644 --- a/tests/Core/Command/Group/ListCommandTest.php +++ b/tests/Core/Command/Group/ListCommandTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Core\Command\Group; use OC\Core\Command\Group\ListCommand; diff --git a/tests/Core/Command/Group/RemoveUserTest.php b/tests/Core/Command/Group/RemoveUserTest.php index ec7b0f2d714..8a75571e3cb 100644 --- a/tests/Core/Command/Group/RemoveUserTest.php +++ b/tests/Core/Command/Group/RemoveUserTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Core\Command\Group; use OC\Core\Command\Group\RemoveUser; diff --git a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php index 8c023274da5..77757008633 100644 --- a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php +++ b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php @@ -24,11 +24,11 @@ namespace Tests\Core\Command\Maintenance\Mimetype; use OC\Core\Command\Maintenance\Mimetype\UpdateDB; use OC\Files\Type\Detection; use OC\Files\Type\Loader; +use OCP\Files\IMimeTypeDetector; +use OCP\Files\IMimeTypeLoader; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; -use OCP\Files\IMimeTypeDetector; -use OCP\Files\IMimeTypeLoader; class UpdateDBTest extends TestCase { /** @var IMimeTypeDetector */ diff --git a/tests/Core/Command/Maintenance/UpdateTheme.php b/tests/Core/Command/Maintenance/UpdateTheme.php index cbc417dbdba..73141cefcbd 100644 --- a/tests/Core/Command/Maintenance/UpdateTheme.php +++ b/tests/Core/Command/Maintenance/UpdateTheme.php @@ -27,13 +27,13 @@ use OC\Core\Command\Maintenance\Mimetype\UpdateDB; use OC\Core\Command\Maintenance\UpdateTheme; use OC\Files\Type\Detection; use OC\Files\Type\Loader; +use OCP\Files\IMimeTypeDetector; +use OCP\Files\IMimeTypeLoader; use OCP\ICache; use OCP\ICacheFactory; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Test\TestCase; -use OCP\Files\IMimeTypeDetector; -use OCP\Files\IMimeTypeLoader; class UpdateThemeTest extends TestCase { /** @var IMimeTypeDetector */ diff --git a/tests/Core/Command/User/DisableTest.php b/tests/Core/Command/User/DisableTest.php index 758020acc71..019fedc1da9 100644 --- a/tests/Core/Command/User/DisableTest.php +++ b/tests/Core/Command/User/DisableTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Tests\Core\Command\User; diff --git a/tests/Core/Command/User/EnableTest.php b/tests/Core/Command/User/EnableTest.php index 60b415ae79d..9a3df13efe0 100644 --- a/tests/Core/Command/User/EnableTest.php +++ b/tests/Core/Command/User/EnableTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Tests\Core\Command\User; diff --git a/tests/Core/Controller/AvatarControllerTest.php b/tests/Core/Controller/AvatarControllerTest.php index 5fce8fc6359..6f82607dc02 100644 --- a/tests/Core/Controller/AvatarControllerTest.php +++ b/tests/Core/Controller/AvatarControllerTest.php @@ -34,13 +34,13 @@ namespace Tests\Core\Controller; use OC\AppFramework\Utility\TimeFactory; use OC\Core\Controller\AvatarController; use OCP\AppFramework\Http; -use OCP\ICache; use OCP\Files\File; use OCP\Files\IRootFolder; use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; use OCP\IAvatar; use OCP\IAvatarManager; +use OCP\ICache; use OCP\IL10N; use OCP\ILogger; use OCP\IRequest; diff --git a/tests/Core/Controller/ChangePasswordControllerTest.php b/tests/Core/Controller/ChangePasswordControllerTest.php index e171b46d86d..55f05c975ed 100644 --- a/tests/Core/Controller/ChangePasswordControllerTest.php +++ b/tests/Core/Controller/ChangePasswordControllerTest.php @@ -19,11 +19,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Tests\Core\Controller; use OC\HintException; -use OCA\Settings\Controller\ChangePasswordController; use OC\User\Session; +use OCA\Settings\Controller\ChangePasswordController; use OCP\App\IAppManager; use OCP\AppFramework\Http\JSONResponse; use OCP\IGroupManager; diff --git a/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php b/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php index 911a4923675..c3ed740432c 100644 --- a/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php +++ b/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php @@ -318,4 +318,3 @@ class ClientFlowLoginV2ControllerTest extends TestCase { $this->assertTrue($clearedState); } } - diff --git a/tests/Core/Controller/CssControllerTest.php b/tests/Core/Controller/CssControllerTest.php index f4e6e83201e..faab89db40c 100644 --- a/tests/Core/Controller/CssControllerTest.php +++ b/tests/Core/Controller/CssControllerTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Tests\Core\Controller; use OC\Core\Controller\CssController; diff --git a/tests/Core/Controller/JsControllerTest.php b/tests/Core/Controller/JsControllerTest.php index 307ef837786..e05f5bf5ded 100644 --- a/tests/Core/Controller/JsControllerTest.php +++ b/tests/Core/Controller/JsControllerTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Tests\Core\Controller; use OC\Core\Controller\JsController; diff --git a/tests/Core/Controller/NavigationControllerTest.php b/tests/Core/Controller/NavigationControllerTest.php index 4095526fc0b..71730a8f8b9 100644 --- a/tests/Core/Controller/NavigationControllerTest.php +++ b/tests/Core/Controller/NavigationControllerTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Tests\Core\Controller; use OC\Core\Controller\NavigationController; diff --git a/tests/Core/Controller/OCSControllerTest.php b/tests/Core/Controller/OCSControllerTest.php index a22c3bdc5e0..241c3b12477 100644 --- a/tests/Core/Controller/OCSControllerTest.php +++ b/tests/Core/Controller/OCSControllerTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace OC\Core\Controller; use OC\CapabilitiesManager; diff --git a/tests/Core/Controller/PreviewControllerTest.php b/tests/Core/Controller/PreviewControllerTest.php index df1af6a0802..7b66d32f61e 100644 --- a/tests/Core/Controller/PreviewControllerTest.php +++ b/tests/Core/Controller/PreviewControllerTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Tests\Core\Controller; use OC\Core\Controller\PreviewController; diff --git a/tests/Core/Controller/UserControllerTest.php b/tests/Core/Controller/UserControllerTest.php index d15bbf7f871..7a089d5e57e 100644 --- a/tests/Core/Controller/UserControllerTest.php +++ b/tests/Core/Controller/UserControllerTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Core\Controller; use OC\Core\Controller\UserController; diff --git a/tests/Core/Middleware/TwoFactorMiddlewareTest.php b/tests/Core/Middleware/TwoFactorMiddlewareTest.php index 06aea147a23..994599212f9 100644 --- a/tests/Core/Middleware/TwoFactorMiddlewareTest.php +++ b/tests/Core/Middleware/TwoFactorMiddlewareTest.php @@ -22,13 +22,13 @@ namespace Test\Core\Middleware; +use OC\AppFramework\Http\Request; use OC\Authentication\Exceptions\TwoFactorAuthRequiredException; use OC\Authentication\Exceptions\UserAlreadyLoggedInException; use OC\Authentication\TwoFactorAuth\Manager; use OC\Authentication\TwoFactorAuth\ProviderSet; use OC\Core\Controller\TwoFactorChallengeController; use OC\Core\Middleware\TwoFactorMiddleware; -use OC\AppFramework\Http\Request; use OC\User\Session; use OCP\AppFramework\Controller; use OCP\AppFramework\Utility\IControllerMethodReflector; diff --git a/tests/lib/Accounts/AccountsManagerTest.php b/tests/lib/Accounts/AccountsManagerTest.php index bff3b353a1e..9d9a0e01583 100644 --- a/tests/lib/Accounts/AccountsManagerTest.php +++ b/tests/lib/Accounts/AccountsManagerTest.php @@ -19,7 +19,6 @@ * */ - namespace Test\Accounts; diff --git a/tests/lib/Accounts/HooksTest.php b/tests/lib/Accounts/HooksTest.php index 071e78146ea..0534f2dba6b 100644 --- a/tests/lib/Accounts/HooksTest.php +++ b/tests/lib/Accounts/HooksTest.php @@ -19,7 +19,6 @@ * */ - namespace Test\Accounts; diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php index 0e3410b8f20..66b210c4c13 100644 --- a/tests/lib/App/AppManagerTest.php +++ b/tests/lib/App/AppManagerTest.php @@ -15,16 +15,16 @@ use OC\Group\Group; use OC\User\User; use OCP\App\AppPathNotFoundException; use OCP\App\IAppManager; +use OCP\IAppConfig; use OCP\ICache; use OCP\ICacheFactory; +use OCP\IConfig; use OCP\IGroup; use OCP\IGroupManager; use OCP\ILogger; +use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserSession; -use OCP\IAppConfig; -use OCP\IConfig; -use OCP\IURLGenerator; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Test\TestCase; diff --git a/tests/lib/AppFramework/AppTest.php b/tests/lib/AppFramework/AppTest.php index b9c0f47216a..cd3e7c47ad6 100644 --- a/tests/lib/AppFramework/AppTest.php +++ b/tests/lib/AppFramework/AppTest.php @@ -21,7 +21,6 @@ * */ - namespace Test\AppFramework; use OC\AppFramework\App; @@ -30,7 +29,6 @@ use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Response; - function rrmdir($directory) { $files = array_diff(scandir($directory), array('.','..')); foreach ($files as $file) { diff --git a/tests/lib/AppFramework/Controller/ApiControllerTest.php b/tests/lib/AppFramework/Controller/ApiControllerTest.php index b7172ab6a9f..ccc44b97764 100644 --- a/tests/lib/AppFramework/Controller/ApiControllerTest.php +++ b/tests/lib/AppFramework/Controller/ApiControllerTest.php @@ -21,14 +21,12 @@ * */ - namespace Test\AppFramework\Controller; use OC\AppFramework\Http\Request; use OCP\AppFramework\ApiController; use OCP\IConfig; - class ChildApiController extends ApiController {}; diff --git a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php index 169ec82ce6d..30da40d36b4 100644 --- a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php +++ b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Controller; use OC\AppFramework\Middleware\PublicShare\Exceptions\NeedAuthenticationException; diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php index 09d89aa70fd..7831b44b632 100644 --- a/tests/lib/AppFramework/Controller/ControllerTest.php +++ b/tests/lib/AppFramework/Controller/ControllerTest.php @@ -21,17 +21,15 @@ * */ - namespace Test\AppFramework\Controller; use OC\AppFramework\Http\Request; use OCP\AppFramework\Controller; -use OCP\AppFramework\Http\TemplateResponse; -use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http\DataResponse; +use OCP\AppFramework\Http\JSONResponse; +use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; - class ChildController extends Controller { public function __construct($appName, $request) { diff --git a/tests/lib/AppFramework/Controller/OCSControllerTest.php b/tests/lib/AppFramework/Controller/OCSControllerTest.php index 0d379a8822c..f5eb838b584 100644 --- a/tests/lib/AppFramework/Controller/OCSControllerTest.php +++ b/tests/lib/AppFramework/Controller/OCSControllerTest.php @@ -21,7 +21,6 @@ * */ - namespace Test\AppFramework\Controller; use OC\AppFramework\Http\Request; @@ -31,7 +30,6 @@ use OCP\AppFramework\OCSController; use OCP\IConfig; use OCP\Security\ISecureRandom; - class ChildOCSController extends OCSController {} diff --git a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php index eff7563cc4f..f20f996d5a3 100644 --- a/tests/lib/AppFramework/Controller/PublicShareControllerTest.php +++ b/tests/lib/AppFramework/Controller/PublicShareControllerTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Controller; use OC\AppFramework\Middleware\PublicShare\Exceptions\NeedAuthenticationException; @@ -35,7 +36,6 @@ use OCP\IRequest; use OCP\ISession; use OCP\IURLGenerator; - class PublicShareControllerTest extends \Test\TestCase { /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php index c9a90da7c59..fd075a9300d 100644 --- a/tests/lib/AppFramework/Db/EntityTest.php +++ b/tests/lib/AppFramework/Db/EntityTest.php @@ -26,7 +26,6 @@ namespace Test\AppFramework\Db; use OCP\AppFramework\Db\Entity; - /** * @method integer getId() * @method void setId(integer $id) diff --git a/tests/lib/AppFramework/Db/MapperTest.php b/tests/lib/AppFramework/Db/MapperTest.php index 990391a1de1..8ca80fe11ca 100644 --- a/tests/lib/AppFramework/Db/MapperTest.php +++ b/tests/lib/AppFramework/Db/MapperTest.php @@ -21,14 +21,13 @@ * */ - namespace Test\AppFramework\Db; use OCP\AppFramework\Db\DoesNotExistException; +use OCP\AppFramework\Db\Entity; +use OCP\AppFramework\Db\Mapper; use OCP\AppFramework\Db\MultipleObjectsReturnedException; -use \OCP\IDBConnection; -use \OCP\AppFramework\Db\Entity; -use \OCP\AppFramework\Db\Mapper; +use OCP\IDBConnection; /** * @method integer getId() diff --git a/tests/lib/AppFramework/Db/MapperTestUtility.php b/tests/lib/AppFramework/Db/MapperTestUtility.php index bbc9b56701e..71c21a06632 100644 --- a/tests/lib/AppFramework/Db/MapperTestUtility.php +++ b/tests/lib/AppFramework/Db/MapperTestUtility.php @@ -21,7 +21,6 @@ * */ - namespace Test\AppFramework\Db; @@ -206,4 +205,3 @@ class ArgumentIterator { } } } - diff --git a/tests/lib/AppFramework/Db/QBMapperTest.php b/tests/lib/AppFramework/Db/QBMapperTest.php index 673d8132836..279c95afaeb 100644 --- a/tests/lib/AppFramework/Db/QBMapperTest.php +++ b/tests/lib/AppFramework/Db/QBMapperTest.php @@ -238,4 +238,4 @@ class QBMapperTest extends \Test\TestCase { $unknownType = $this->mapper->getParameterTypeForPropertyForTest($entity, 'someProp'); $this->assertEquals(IQueryBuilder::PARAM_STR, $unknownType, 'Unknown type property mapping incorrect'); } -}
\ No newline at end of file +} diff --git a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php index 29004b36b18..03c8265f2c9 100644 --- a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php +++ b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php @@ -23,12 +23,11 @@ * */ - namespace Test\AppFramework\DependencyInjection; use OC\AppFramework\DependencyInjection\DIContainer; -use \OC\AppFramework\Http\Request; +use OC\AppFramework\Http\Request; use OC\AppFramework\Middleware\Security\SecurityMiddleware; use OCP\AppFramework\QueryException; use OCP\IConfig; diff --git a/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php b/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php index e77f2021d9e..d3d3f73e872 100644 --- a/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php +++ b/tests/lib/AppFramework/DependencyInjection/DIIntergrationTests.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\DependencyInjection; use OC\AppFramework\DependencyInjection\DIContainer; diff --git a/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php b/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php index fab488ef990..b6163e90386 100644 --- a/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php +++ b/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php @@ -6,7 +6,6 @@ * See the COPYING-README file. */ - namespace Test\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/tests/lib/AppFramework/Http/DataResponseTest.php b/tests/lib/AppFramework/Http/DataResponseTest.php index 9cb99b06b65..6f81e0d56b4 100644 --- a/tests/lib/AppFramework/Http/DataResponseTest.php +++ b/tests/lib/AppFramework/Http/DataResponseTest.php @@ -21,13 +21,11 @@ * */ - namespace Test\AppFramework\Http; -use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http; - +use OCP\AppFramework\Http\DataResponse; class DataResponseTest extends \Test\TestCase { diff --git a/tests/lib/AppFramework/Http/DispatcherTest.php b/tests/lib/AppFramework/Http/DispatcherTest.php index 221e27e3b68..404c94abdbd 100644 --- a/tests/lib/AppFramework/Http/DispatcherTest.php +++ b/tests/lib/AppFramework/Http/DispatcherTest.php @@ -21,21 +21,19 @@ * */ - namespace Test\AppFramework\Http; use OC\AppFramework\Http\Dispatcher; use OC\AppFramework\Http\Request; use OC\AppFramework\Middleware\MiddlewareDispatcher; use OC\AppFramework\Utility\ControllerMethodReflector; +use OCP\AppFramework\Controller; use OCP\AppFramework\Http; -use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http\DataResponse; +use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http\Response; -use OCP\AppFramework\Controller; use OCP\IConfig; - class TestController extends Controller { /** * @param string $appName diff --git a/tests/lib/AppFramework/Http/DownloadResponseTest.php b/tests/lib/AppFramework/Http/DownloadResponseTest.php index 07c932b2725..97c7ab75ed9 100644 --- a/tests/lib/AppFramework/Http/DownloadResponseTest.php +++ b/tests/lib/AppFramework/Http/DownloadResponseTest.php @@ -21,7 +21,6 @@ * */ - namespace Test\AppFramework\Http; diff --git a/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php b/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php index 7e86903892f..d9bdfccf60b 100644 --- a/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php +++ b/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php @@ -6,7 +6,6 @@ * See the COPYING-README file. */ - namespace Test\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php index 49334c17e74..2c91289a5c9 100644 --- a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php +++ b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/tests/lib/AppFramework/Http/HttpTest.php b/tests/lib/AppFramework/Http/HttpTest.php index 66256d1a86f..0a13e1e11e5 100644 --- a/tests/lib/AppFramework/Http/HttpTest.php +++ b/tests/lib/AppFramework/Http/HttpTest.php @@ -21,12 +21,10 @@ * */ - namespace Test\AppFramework\Http; use OC\AppFramework\Http; - class HttpTest extends \Test\TestCase { private $server; diff --git a/tests/lib/AppFramework/Http/JSONResponseTest.php b/tests/lib/AppFramework/Http/JSONResponseTest.php index 3c3a273a97e..a74bd67d1f0 100644 --- a/tests/lib/AppFramework/Http/JSONResponseTest.php +++ b/tests/lib/AppFramework/Http/JSONResponseTest.php @@ -23,12 +23,11 @@ * */ - namespace Test\AppFramework\Http; -use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\JSONResponse; class JSONResponseTest extends \Test\TestCase { diff --git a/tests/lib/AppFramework/Http/OCSResponseTest.php b/tests/lib/AppFramework/Http/OCSResponseTest.php index adac66a231c..e092cb53f58 100644 --- a/tests/lib/AppFramework/Http/OCSResponseTest.php +++ b/tests/lib/AppFramework/Http/OCSResponseTest.php @@ -21,13 +21,11 @@ * */ - namespace Test\AppFramework\Http; use OCP\AppFramework\Http\OCSResponse; - class OCSResponseTest extends \Test\TestCase { diff --git a/tests/lib/AppFramework/Http/PublicTemplateResponseTest.php b/tests/lib/AppFramework/Http/PublicTemplateResponseTest.php index 8aaaec0733c..90fb8cceca1 100644 --- a/tests/lib/AppFramework/Http/PublicTemplateResponseTest.php +++ b/tests/lib/AppFramework/Http/PublicTemplateResponseTest.php @@ -22,11 +22,10 @@ * */ - namespace Test\AppFramework\Http; -use OCP\AppFramework\Http\Template\PublicTemplateResponse; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Template\PublicTemplateResponse; use Test\TestCase; class PublicTemplateResponseTest extends TestCase { diff --git a/tests/lib/AppFramework/Http/RedirectResponseTest.php b/tests/lib/AppFramework/Http/RedirectResponseTest.php index 5ef82a1221d..218f748a88b 100644 --- a/tests/lib/AppFramework/Http/RedirectResponseTest.php +++ b/tests/lib/AppFramework/Http/RedirectResponseTest.php @@ -21,13 +21,11 @@ * */ - namespace Test\AppFramework\Http; use OCP\AppFramework\Http; use OCP\AppFramework\Http\RedirectResponse; - class RedirectResponseTest extends \Test\TestCase { /** diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index b01176f0cf1..2ad660405f3 100644 --- a/tests/lib/AppFramework/Http/RequestTest.php +++ b/tests/lib/AppFramework/Http/RequestTest.php @@ -13,8 +13,8 @@ namespace Test\AppFramework\Http; use OC\AppFramework\Http\Request; use OC\Security\CSRF\CsrfToken; use OC\Security\CSRF\CsrfTokenManager; -use OCP\Security\ISecureRandom; use OCP\IConfig; +use OCP\Security\ISecureRandom; /** * Class RequestTest diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php index 9d6442ea3ce..64b9566f8e6 100644 --- a/tests/lib/AppFramework/Http/ResponseTest.php +++ b/tests/lib/AppFramework/Http/ResponseTest.php @@ -21,15 +21,13 @@ * */ - namespace Test\AppFramework\Http; -use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Response; use OCP\AppFramework\Utility\ITimeFactory; - class ResponseTest extends \Test\TestCase { /** diff --git a/tests/lib/AppFramework/Http/StreamResponseTest.php b/tests/lib/AppFramework/Http/StreamResponseTest.php index c082b36e0ac..ef9a37aa81b 100644 --- a/tests/lib/AppFramework/Http/StreamResponseTest.php +++ b/tests/lib/AppFramework/Http/StreamResponseTest.php @@ -21,14 +21,12 @@ * */ - namespace Test\AppFramework\Http; -use OCP\AppFramework\Http\StreamResponse; -use OCP\AppFramework\Http\IOutput; use OCP\AppFramework\Http; - +use OCP\AppFramework\Http\IOutput; +use OCP\AppFramework\Http\StreamResponse; class StreamResponseTest extends \Test\TestCase { diff --git a/tests/lib/AppFramework/Http/TemplateResponseTest.php b/tests/lib/AppFramework/Http/TemplateResponseTest.php index c06497ef5d5..b5586222257 100644 --- a/tests/lib/AppFramework/Http/TemplateResponseTest.php +++ b/tests/lib/AppFramework/Http/TemplateResponseTest.php @@ -21,12 +21,10 @@ * */ - namespace Test\AppFramework\Http; -use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http; - +use OCP\AppFramework\Http\TemplateResponse; class TemplateResponseTest extends \Test\TestCase { diff --git a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php index e6c2c1b4f53..e38aa4525e3 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php @@ -21,17 +21,15 @@ * */ - namespace Test\AppFramework\Middleware; use OC\AppFramework\Http\Request; use OC\AppFramework\Middleware\MiddlewareDispatcher; use OCP\AppFramework\Controller; -use OCP\AppFramework\Middleware; use OCP\AppFramework\Http\Response; +use OCP\AppFramework\Middleware; use OCP\IConfig; - // needed to test ordering class TestMiddleware extends Middleware { public static $beforeControllerCalled = 0; diff --git a/tests/lib/AppFramework/Middleware/MiddlewareTest.php b/tests/lib/AppFramework/Middleware/MiddlewareTest.php index 038bec25148..8f9c60b65ff 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareTest.php @@ -21,12 +21,11 @@ * */ - namespace Test\AppFramework\Middleware; use OC\AppFramework\Http\Request; -use OCP\AppFramework\Middleware; use OCP\AppFramework\Http\Response; +use OCP\AppFramework\Middleware; use OCP\IConfig; class ChildMiddleware extends Middleware {}; diff --git a/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php index 5b88872d905..cca3b4aecca 100644 --- a/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php @@ -19,8 +19,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Middleware; +use OC\AppFramework\Middleware\OCSMiddleware; use OC\AppFramework\OCS\BaseResponse; use OC\AppFramework\OCS\V1Response; use OC\AppFramework\OCS\V2Response; @@ -32,8 +34,6 @@ use OCP\AppFramework\OCS\OCSForbiddenException; use OCP\AppFramework\OCS\OCSNotFoundException; use OCP\AppFramework\OCSController; use OCP\IRequest; -use OC\AppFramework\Middleware\OCSMiddleware; - class OCSMiddlewareTest extends \Test\TestCase { diff --git a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php index de610100c2a..4ad90b6e874 100644 --- a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Middleware\PublicShare; use OC\AppFramework\Middleware\PublicShare\Exceptions\NeedAuthenticationException; @@ -35,7 +36,6 @@ use OCP\IRequest; use OCP\ISession; use OCP\IURLGenerator; - class PublicShareMiddlewareTest extends \Test\TestCase { /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php index 498eaed8949..0fab8803073 100644 --- a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php @@ -9,13 +9,12 @@ * @copyright Bernhard Posselt 2014 */ - namespace Test\AppFramework\Middleware\Security; use OC\AppFramework\Http\Request; use OC\AppFramework\Middleware\Security\CORSMiddleware; -use OC\AppFramework\Utility\ControllerMethodReflector; use OC\AppFramework\Middleware\Security\Exceptions\SecurityException; +use OC\AppFramework\Utility\ControllerMethodReflector; use OC\Security\Bruteforce\Throttler; use OC\User\Session; use OCP\AppFramework\Controller; diff --git a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php index 95729e286f9..c981e840d70 100644 --- a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Middleware\Security; use OC\AppFramework\Middleware\Security\Exceptions\NotConfirmedException; diff --git a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php index 7784f55e84a..c92c131780e 100644 --- a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Middleware\Security; use OC\AppFramework\Http\Request; diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index 6a1adf03b2f..00bb1a0bb3c 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -40,8 +40,8 @@ use OC\Security\CSRF\CsrfTokenManager; use OCP\App\IAppManager; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\EmptyContentSecurityPolicy; -use OCP\AppFramework\Http\RedirectResponse; use OCP\AppFramework\Http\JSONResponse; +use OCP\AppFramework\Http\RedirectResponse; use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; diff --git a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php index 813b0d54dc6..2cd61c73c71 100644 --- a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php @@ -9,7 +9,6 @@ * @copyright Thomas Müller 2014 */ - namespace Test\AppFramework\Middleware; use OC\AppFramework\Http\Request; @@ -19,7 +18,6 @@ use OCP\AppFramework\Controller; use OCP\AppFramework\Http\Response; use OCP\IConfig; - class SessionMiddlewareTest extends \Test\TestCase { /** @var ControllerMethodReflector */ diff --git a/tests/lib/AppFramework/Routing/RoutingTest.php b/tests/lib/AppFramework/Routing/RoutingTest.php index fccece481ce..559561a8ccd 100644 --- a/tests/lib/AppFramework/Routing/RoutingTest.php +++ b/tests/lib/AppFramework/Routing/RoutingTest.php @@ -5,10 +5,10 @@ namespace Test\AppFramework\Routing; use OC\AppFramework\DependencyInjection\DIContainer; use OC\AppFramework\Routing\RouteActionHandler; use OC\AppFramework\Routing\RouteConfig; +use OC\Route\Router; use OCP\ILogger; use OCP\Route\IRouter; use PHPUnit\Framework\MockObject\MockObject; -use OC\Route\Router; class RoutingTest extends \Test\TestCase { diff --git a/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php b/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php index 3c43e7f9219..fe1fc5bfa1a 100644 --- a/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php +++ b/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php @@ -21,7 +21,6 @@ * */ - namespace Test\AppFramework\Utility; diff --git a/tests/lib/AppFramework/Utility/SimpleContainerTest.php b/tests/lib/AppFramework/Utility/SimpleContainerTest.php index e21e0ca13f2..b2f6c6ad8d0 100644 --- a/tests/lib/AppFramework/Utility/SimpleContainerTest.php +++ b/tests/lib/AppFramework/Utility/SimpleContainerTest.php @@ -20,11 +20,11 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\AppFramework\Utility; use OC\AppFramework\Utility\SimpleContainer; - interface TestInterface {} class ClassEmptyConstructor implements IInterfaceConstructor {} diff --git a/tests/lib/AppTest.php b/tests/lib/AppTest.php index 0848f307230..a1f340075b8 100644 --- a/tests/lib/AppTest.php +++ b/tests/lib/AppTest.php @@ -618,4 +618,3 @@ class AppTest extends \Test\TestCase { $this->assertEquals('English', \OC_App::parseAppInfo($data, 'en')['description']); } } - diff --git a/tests/lib/Authentication/Login/CompleteLoginCommandTest.php b/tests/lib/Authentication/Login/CompleteLoginCommandTest.php index 8912dcab09c..bf312e7f4e3 100644 --- a/tests/lib/Authentication/Login/CompleteLoginCommandTest.php +++ b/tests/lib/Authentication/Login/CompleteLoginCommandTest.php @@ -64,4 +64,4 @@ class CompleteLoginCommandTest extends ALoginCommandTest { } -}
\ No newline at end of file +} diff --git a/tests/lib/Authentication/Token/ManagerTest.php b/tests/lib/Authentication/Token/ManagerTest.php index 1b7f3a637ce..48876cade6b 100644 --- a/tests/lib/Authentication/Token/ManagerTest.php +++ b/tests/lib/Authentication/Token/ManagerTest.php @@ -27,12 +27,12 @@ use OC\Authentication\Exceptions\InvalidTokenException; use OC\Authentication\Exceptions\PasswordlessTokenException; use OC\Authentication\Token\DefaultToken; use OC\Authentication\Token\DefaultTokenProvider; +use OC\Authentication\Token\ExpiredTokenException; +use OC\Authentication\Token\IToken; use OC\Authentication\Token\Manager; use OC\Authentication\Token\PublicKeyToken; use OC\Authentication\Token\PublicKeyTokenMapper; use OC\Authentication\Token\PublicKeyTokenProvider; -use OC\Authentication\Token\ExpiredTokenException; -use OC\Authentication\Token\IToken; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Utility\ITimeFactory; use OCP\IConfig; diff --git a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php index 22e1891b51f..b8c399b81f8 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php @@ -25,9 +25,9 @@ declare(strict_types=1); namespace Test\Authentication\Token; use OC; +use OC\Authentication\Token\IToken; use OC\Authentication\Token\PublicKeyToken; use OC\Authentication\Token\PublicKeyTokenMapper; -use OC\Authentication\Token\IToken; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use OCP\IUser; diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php index ce64878bf5e..1b468839cb7 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php @@ -26,10 +26,10 @@ namespace Test\Authentication\Token; use OC\Authentication\Exceptions\ExpiredTokenException; use OC\Authentication\Exceptions\InvalidTokenException; use OC\Authentication\Token\DefaultToken; +use OC\Authentication\Token\IToken; use OC\Authentication\Token\PublicKeyToken; use OC\Authentication\Token\PublicKeyTokenMapper; use OC\Authentication\Token\PublicKeyTokenProvider; -use OC\Authentication\Token\IToken; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Utility\ITimeFactory; use OCP\IConfig; diff --git a/tests/lib/Authentication/Token/RemoteWipeTest.php b/tests/lib/Authentication/Token/RemoteWipeTest.php index 7193bee5389..5773bb596a5 100644 --- a/tests/lib/Authentication/Token/RemoteWipeTest.php +++ b/tests/lib/Authentication/Token/RemoteWipeTest.php @@ -26,8 +26,8 @@ namespace Test\Authentication\Token; use OC\Authentication\Events\RemoteWipeFinished; use OC\Authentication\Events\RemoteWipeStarted; use OC\Authentication\Exceptions\WipeTokenException; -use OC\Authentication\Token\IProvider as ITokenProvider; use OC\Authentication\Token\IProvider; +use OC\Authentication\Token\IProvider as ITokenProvider; use OC\Authentication\Token\IToken; use OC\Authentication\Token\IWipeableToken; use OC\Authentication\Token\RemoteWipe; diff --git a/tests/lib/Avatar/AvatarManagerTest.php b/tests/lib/Avatar/AvatarManagerTest.php index 7466f664eb5..ae3ee89cec2 100644 --- a/tests/lib/Avatar/AvatarManagerTest.php +++ b/tests/lib/Avatar/AvatarManagerTest.php @@ -24,8 +24,8 @@ namespace Test\Avatar; -use OC\Avatar\UserAvatar; use OC\Avatar\AvatarManager; +use OC\Avatar\UserAvatar; use OC\User\Manager; use OCP\Files\IAppData; use OCP\Files\SimpleFS\ISimpleFolder; diff --git a/tests/lib/Calendar/ManagerTest.php b/tests/lib/Calendar/ManagerTest.php index 657a50a3d88..dca9368558f 100644 --- a/tests/lib/Calendar/ManagerTest.php +++ b/tests/lib/Calendar/ManagerTest.php @@ -23,9 +23,9 @@ namespace Test\Calendar; -use \OC\Calendar\Manager; +use OC\Calendar\Manager; use OCP\Calendar\ICalendar; -use \Test\TestCase; +use Test\TestCase; class ManagerTest extends TestCase { diff --git a/tests/lib/Calendar/Resource/ManagerTest.php b/tests/lib/Calendar/Resource/ManagerTest.php index 1d9229856db..3e065c69908 100644 --- a/tests/lib/Calendar/Resource/ManagerTest.php +++ b/tests/lib/Calendar/Resource/ManagerTest.php @@ -23,10 +23,10 @@ namespace Test\Calendar\Resource; -use \OC\Calendar\Resource\Manager; -use \OCP\Calendar\Resource\IBackend; +use OC\Calendar\Resource\Manager; +use OCP\Calendar\Resource\IBackend; use OCP\IServerContainer; -use \Test\TestCase; +use Test\TestCase; class ManagerTest extends TestCase { diff --git a/tests/lib/Calendar/Room/ManagerTest.php b/tests/lib/Calendar/Room/ManagerTest.php index 52347f439fa..9a85132aa3a 100644 --- a/tests/lib/Calendar/Room/ManagerTest.php +++ b/tests/lib/Calendar/Room/ManagerTest.php @@ -23,10 +23,10 @@ namespace Test\Calendar\Room; -use \OC\Calendar\Room\Manager; -use \OCP\Calendar\Room\IBackend; +use OC\Calendar\Room\Manager; +use OCP\Calendar\Room\IBackend; use OCP\IServerContainer; -use \Test\TestCase; +use Test\TestCase; class ManagerTest extends TestCase { diff --git a/tests/lib/Command/BackgroundJobsTest.php b/tests/lib/Command/BackgroundJobsTest.php index 6292d5d0e97..fc506be644a 100644 --- a/tests/lib/Command/BackgroundJobsTest.php +++ b/tests/lib/Command/BackgroundJobsTest.php @@ -25,13 +25,13 @@ namespace Test\Command; -use Test\TestCase; -use Symfony\Component\Console\Input\StringInput; -use Symfony\Component\Console\Output\NullOutput; - +use OC\Core\Command\Background\Ajax; use OC\Core\Command\Background\Cron; use OC\Core\Command\Background\WebCron; -use OC\Core\Command\Background\Ajax; + +use Symfony\Component\Console\Input\StringInput; +use Symfony\Component\Console\Output\NullOutput; +use Test\TestCase; class BackgroundJobsTest extends TestCase { diff --git a/tests/lib/Command/Integrity/SignAppTest.php b/tests/lib/Command/Integrity/SignAppTest.php index 013290b56e9..2615c6afc1e 100644 --- a/tests/lib/Command/Integrity/SignAppTest.php +++ b/tests/lib/Command/Integrity/SignAppTest.php @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + namespace Test\Command\Integrity; use OC\Core\Command\Integrity\SignApp; diff --git a/tests/lib/Command/Integrity/SignCoreTest.php b/tests/lib/Command/Integrity/SignCoreTest.php index 35e52b951da..e601b4a1a90 100644 --- a/tests/lib/Command/Integrity/SignCoreTest.php +++ b/tests/lib/Command/Integrity/SignCoreTest.php @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + namespace Test\Command\Integrity; use OC\Core\Command\Integrity\SignCore; diff --git a/tests/lib/DB/MigrationsTest.php b/tests/lib/DB/MigrationsTest.php index 8654c83a545..87547debe80 100644 --- a/tests/lib/DB/MigrationsTest.php +++ b/tests/lib/DB/MigrationsTest.php @@ -7,7 +7,6 @@ * See the COPYING-README file. */ - namespace Test\DB; use Doctrine\DBAL\Platforms\OraclePlatform; diff --git a/tests/lib/DB/MigratorTest.php b/tests/lib/DB/MigratorTest.php index 9dfed5ecd1a..e9c52015dbe 100644 --- a/tests/lib/DB/MigratorTest.php +++ b/tests/lib/DB/MigratorTest.php @@ -9,10 +9,10 @@ namespace Test\DB; -use \Doctrine\DBAL\DBALException; +use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Platforms\OraclePlatform; -use \Doctrine\DBAL\Schema\Schema; -use \Doctrine\DBAL\Schema\SchemaConfig; +use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Schema\SchemaConfig; use OCP\IConfig; /** diff --git a/tests/lib/Encryption/DecryptAllTest.php b/tests/lib/Encryption/DecryptAllTest.php index 4e4b2438a25..158e52f4a07 100644 --- a/tests/lib/Encryption/DecryptAllTest.php +++ b/tests/lib/Encryption/DecryptAllTest.php @@ -19,7 +19,6 @@ * */ - namespace Test\Encryption; diff --git a/tests/lib/Encryption/EncryptionWrapperTest.php b/tests/lib/Encryption/EncryptionWrapperTest.php index cff48d2cd6d..6a51d769751 100644 --- a/tests/lib/Encryption/EncryptionWrapperTest.php +++ b/tests/lib/Encryption/EncryptionWrapperTest.php @@ -19,7 +19,6 @@ * */ - namespace Test\Encryption; diff --git a/tests/lib/Encryption/UpdateTest.php b/tests/lib/Encryption/UpdateTest.php index a8cbef70d75..68639ad6e24 100644 --- a/tests/lib/Encryption/UpdateTest.php +++ b/tests/lib/Encryption/UpdateTest.php @@ -19,7 +19,6 @@ * */ - namespace Test\Encryption; diff --git a/tests/lib/FileChunkingTest.php b/tests/lib/FileChunkingTest.php index 42fc820c5d0..75a6913d4ad 100644 --- a/tests/lib/FileChunkingTest.php +++ b/tests/lib/FileChunkingTest.php @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + namespace Test; use OCP\ICache; diff --git a/tests/lib/Files/AppData/AppDataTest.php b/tests/lib/Files/AppData/AppDataTest.php index 1d5cea0faf1..a9353540fff 100644 --- a/tests/lib/Files/AppData/AppDataTest.php +++ b/tests/lib/Files/AppData/AppDataTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Files\AppData; use OC\Files\AppData\AppData; diff --git a/tests/lib/Files/AppData/FactoryTest.php b/tests/lib/Files/AppData/FactoryTest.php index 75999c8c7da..9b7529b18d9 100644 --- a/tests/lib/Files/AppData/FactoryTest.php +++ b/tests/lib/Files/AppData/FactoryTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Files\AppData; use OC\Files\AppData\Factory; diff --git a/tests/lib/Files/Cache/UpdaterLegacyTest.php b/tests/lib/Files/Cache/UpdaterLegacyTest.php index 66fa8d51932..a0cc1c5d89c 100644 --- a/tests/lib/Files/Cache/UpdaterLegacyTest.php +++ b/tests/lib/Files/Cache/UpdaterLegacyTest.php @@ -8,7 +8,7 @@ namespace Test\Files\Cache; -use \OC\Files\Filesystem as Filesystem; +use OC\Files\Filesystem as Filesystem; use OC\Files\Storage\Temporary; use OC\Files\View; diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php index 299ec1a4378..4bfc8710951 100644 --- a/tests/lib/Files/Config/UserMountCacheTest.php +++ b/tests/lib/Files/Config/UserMountCacheTest.php @@ -10,10 +10,10 @@ namespace Test\Files\Config; use OC\DB\QueryBuilder\Literal; use OC\Files\Mount\MountPoint; +use OC\Files\Storage\Storage; use OC\Log; use OC\User\Manager; use OCP\Files\Config\ICachedMountInfo; -use OC\Files\Storage\Storage; use OCP\IConfig; use OCP\IDBConnection; use OCP\IUserManager; diff --git a/tests/lib/Files/Mount/ManagerTest.php b/tests/lib/Files/Mount/ManagerTest.php index 46ae597f56b..7633ffb2f2d 100644 --- a/tests/lib/Files/Mount/ManagerTest.php +++ b/tests/lib/Files/Mount/ManagerTest.php @@ -8,7 +8,7 @@ namespace Test\Files\Mount; -use \OC\Files\Storage\Temporary; +use OC\Files\Storage\Temporary; class LongId extends Temporary { public function getId() { diff --git a/tests/lib/Files/Node/NodeTest.php b/tests/lib/Files/Node/NodeTest.php index dee5a0211c5..566c84e2c85 100644 --- a/tests/lib/Files/Node/NodeTest.php +++ b/tests/lib/Files/Node/NodeTest.php @@ -14,13 +14,13 @@ use OC\Files\View; use OCP\Files\Config\IUserMountCache; use OCP\Files\IRootFolder; use OCP\Files\Node; +use OCP\Files\NotFoundException; use OCP\Files\Storage; use OCP\IConfig; use OCP\ILogger; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; -use OCP\Files\NotFoundException; /** * Class NodeTest diff --git a/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php b/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php index 4ad3798a467..aa3b2519ec1 100644 --- a/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php +++ b/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php @@ -51,4 +51,3 @@ class FailDeleteObjectStore implements IObjectStore { return $this->objectStore->objectExists($urn); } } - diff --git a/tests/lib/Files/ObjectStore/MapperTest.php b/tests/lib/Files/ObjectStore/MapperTest.php index 19451622fa3..eef308af088 100644 --- a/tests/lib/Files/ObjectStore/MapperTest.php +++ b/tests/lib/Files/ObjectStore/MapperTest.php @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + namespace Test\Files\ObjectStore; diff --git a/tests/lib/Files/ObjectStore/NoopScannerTest.php b/tests/lib/Files/ObjectStore/NoopScannerTest.php index 6d593225e97..1832ed8d61a 100644 --- a/tests/lib/Files/ObjectStore/NoopScannerTest.php +++ b/tests/lib/Files/ObjectStore/NoopScannerTest.php @@ -9,6 +9,7 @@ * later. * See the COPYING-README file. */ + namespace Test\Files\ObjectStore; class NoopScannerTest extends \Test\TestCase { diff --git a/tests/lib/Files/SimpleFS/SimpleFileTest.php b/tests/lib/Files/SimpleFS/SimpleFileTest.php index c1c53b15ecf..b31fa348afa 100644 --- a/tests/lib/Files/SimpleFS/SimpleFileTest.php +++ b/tests/lib/Files/SimpleFS/SimpleFileTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\File\SimpleFS; use OC\Files\SimpleFS\SimpleFile; diff --git a/tests/lib/Files/SimpleFS/SimpleFolderTest.php b/tests/lib/Files/SimpleFS/SimpleFolderTest.php index d86c705d880..551d8c95205 100644 --- a/tests/lib/Files/SimpleFS/SimpleFolderTest.php +++ b/tests/lib/Files/SimpleFS/SimpleFolderTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\File\SimpleFS; use OC\Files\SimpleFS\SimpleFolder; diff --git a/tests/lib/Files/Storage/CopyDirectoryTest.php b/tests/lib/Files/Storage/CopyDirectoryTest.php index 74b8148aa36..034ffb5a53a 100644 --- a/tests/lib/Files/Storage/CopyDirectoryTest.php +++ b/tests/lib/Files/Storage/CopyDirectoryTest.php @@ -50,4 +50,3 @@ class CopyDirectoryTest extends Storage { $this->instance = new CopyDirectoryStorage([]); } } - diff --git a/tests/lib/Files/Storage/LocalTest.php b/tests/lib/Files/Storage/LocalTest.php index f17933413a5..c611a990236 100644 --- a/tests/lib/Files/Storage/LocalTest.php +++ b/tests/lib/Files/Storage/LocalTest.php @@ -109,4 +109,3 @@ class LocalTest extends Storage { $this->addToAssertionCount(1); } } - diff --git a/tests/lib/Files/Storage/StorageFactoryTest.php b/tests/lib/Files/Storage/StorageFactoryTest.php index d3dc036ab42..20b51cdda22 100644 --- a/tests/lib/Files/Storage/StorageFactoryTest.php +++ b/tests/lib/Files/Storage/StorageFactoryTest.php @@ -9,10 +9,10 @@ namespace Test\Files\Storage; use OC\Files\Mount\MountPoint; +use OC\Files\Storage\Wrapper\Wrapper; use OCP\Files\Mount\IMountPoint; use OCP\Files\Storage as IStorage; use Test\TestCase; -use OC\Files\Storage\Wrapper\Wrapper; class DummyWrapper extends Wrapper { public $data; diff --git a/tests/lib/Files/Stream/DummyEncryptionWrapper.php b/tests/lib/Files/Stream/DummyEncryptionWrapper.php index bb512d99c66..599abf894ef 100644 --- a/tests/lib/Files/Stream/DummyEncryptionWrapper.php +++ b/tests/lib/Files/Stream/DummyEncryptionWrapper.php @@ -19,7 +19,6 @@ * */ - namespace Test\Files\Stream; class DummyEncryptionWrapper extends \OC\Files\Stream\Encryption { diff --git a/tests/lib/Files/Type/LoaderTest.php b/tests/lib/Files/Type/LoaderTest.php index a77d672f667..cf6aa31a047 100644 --- a/tests/lib/Files/Type/LoaderTest.php +++ b/tests/lib/Files/Type/LoaderTest.php @@ -21,8 +21,8 @@ namespace Test\Files\Type; -use \OC\Files\Type\Loader; -use \OCP\IDBConnection; +use OC\Files\Type\Loader; +use OCP\IDBConnection; class LoaderTest extends \Test\TestCase { /** @var IDBConnection */ diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 5c37c9a0e93..43a3a06ba0b 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -10,8 +10,8 @@ namespace Test\Files; use OC\Cache\CappedMemoryCache; use OC\Files\Cache\Watcher; use OC\Files\Filesystem; -use OC\Files\Storage\Common; use OC\Files\Mount\MountPoint; +use OC\Files\Storage\Common; use OC\Files\Storage\Temporary; use OC\Files\Stream\Quota; use OC\Files\View; @@ -23,8 +23,8 @@ use OCP\Lock\ILockingProvider; use OCP\Lock\LockedException; use OCP\Share; use OCP\Util; -use Test\TestMoveableMountPoint; use Test\HookHelper; +use Test\TestMoveableMountPoint; use Test\Traits\UserTrait; class TemporaryNoTouch extends Temporary { diff --git a/tests/lib/GlobalScale/ConfigTest.php b/tests/lib/GlobalScale/ConfigTest.php index ec1581625c6..ab5ef351fc0 100644 --- a/tests/lib/GlobalScale/ConfigTest.php +++ b/tests/lib/GlobalScale/ConfigTest.php @@ -19,7 +19,6 @@ * */ - namespace Test\GlobalScale; diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php index 32e30217759..33c2daa9476 100644 --- a/tests/lib/Group/ManagerTest.php +++ b/tests/lib/Group/ManagerTest.php @@ -20,13 +20,14 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + namespace Test\Group; use OC\Group\Database; use OC\User\Manager; +use OCP\GroupInterface; use OCP\ILogger; use OCP\IUser; -use OCP\GroupInterface; use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Test\TestCase; diff --git a/tests/lib/Http/Client/ResponseTest.php b/tests/lib/Http/Client/ResponseTest.php index d50f9a717d5..f62563a95e9 100644 --- a/tests/lib/Http/Client/ResponseTest.php +++ b/tests/lib/Http/Client/ResponseTest.php @@ -8,8 +8,8 @@ namespace Test\Http\Client; -use function GuzzleHttp\Psr7\stream_for; use GuzzleHttp\Psr7\Response as GuzzleResponse; +use function GuzzleHttp\Psr7\stream_for; use OC\Http\Client\Response; /** diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index 7f67f405ac7..febd9f56622 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -22,16 +22,16 @@ namespace Test\IntegrityCheck; use OC\IntegrityCheck\Checker; +use OC\IntegrityCheck\Helpers\AppLocator; +use OC\IntegrityCheck\Helpers\EnvironmentHelper; +use OC\IntegrityCheck\Helpers\FileAccessHelper; use OC\Memcache\NullCache; +use OCP\App\IAppManager; +use OCP\ICacheFactory; +use OCP\IConfig; use phpseclib\Crypt\RSA; use phpseclib\File\X509; use Test\TestCase; -use OC\IntegrityCheck\Helpers\EnvironmentHelper; -use OC\IntegrityCheck\Helpers\FileAccessHelper; -use OC\IntegrityCheck\Helpers\AppLocator; -use OCP\IConfig; -use OCP\ICacheFactory; -use OCP\App\IAppManager; class CheckerTest extends TestCase { /** @var EnvironmentHelper|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php b/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php index 4e581c0f2e2..f2ac46555f5 100644 --- a/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php +++ b/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + namespace Test\IntegrityCheck\Helpers; use OC\IntegrityCheck\Helpers\FileAccessHelper; diff --git a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php index 8d5c38d275a..735a5e2d19a 100644 --- a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php +++ b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php @@ -21,7 +21,7 @@ namespace Test\IntegrityCheck\Iterator; -use \OC\IntegrityCheck\Iterator\ExcludeFileByNameFilterIterator; +use OC\IntegrityCheck\Iterator\ExcludeFileByNameFilterIterator; use Test\TestCase; class ExcludeFileByNameFilterIteratorTest extends TestCase { diff --git a/tests/lib/Lock/NonCachingDBLockingProviderTest.php b/tests/lib/Lock/NonCachingDBLockingProviderTest.php index be5cd1600c8..a5da1f8de75 100644 --- a/tests/lib/Lock/NonCachingDBLockingProviderTest.php +++ b/tests/lib/Lock/NonCachingDBLockingProviderTest.php @@ -51,4 +51,4 @@ class NonCachingDBLockingProviderTest extends DBLockingProviderTest { $this->assertEquals(0, $this->getLockValue('foo')); } -}
\ No newline at end of file +} diff --git a/tests/lib/Lockdown/Filesystem/NullStorageTest.php b/tests/lib/Lockdown/Filesystem/NullStorageTest.php index c6faf325cd4..a8e2d8d6ba4 100644 --- a/tests/lib/Lockdown/Filesystem/NullStorageTest.php +++ b/tests/lib/Lockdown/Filesystem/NullStorageTest.php @@ -24,10 +24,10 @@ namespace Test\Lockdown\Filesystem; use Icewind\Streams\IteratorDirectory; +use OC\Files\FileInfo; use OC\ForbiddenException; use OC\Lockdown\Filesystem\NullCache; use OC\Lockdown\Filesystem\NullStorage; -use OC\Files\FileInfo; use OCP\Files\Storage; use Test\TestCase; diff --git a/tests/lib/Memcache/FactoryTest.php b/tests/lib/Memcache/FactoryTest.php index 1944b1bd35d..971b22d69b2 100644 --- a/tests/lib/Memcache/FactoryTest.php +++ b/tests/lib/Memcache/FactoryTest.php @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + namespace Test\Memcache; use OC\Memcache\NullCache; diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index 97471fa5213..acf08088784 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -12,6 +12,10 @@ namespace Test; +use OC\App\AppManager; +use OC\Group\Manager; +use OC\NavigationManager; +use OC\SubAdmin; use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; @@ -19,10 +23,6 @@ use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserSession; use OCP\L10N\IFactory; -use OC\App\AppManager; -use OC\Group\Manager; -use OC\NavigationManager; -use OC\SubAdmin; class NavigationManagerTest extends TestCase { /** @var AppManager|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/tests/lib/OCS/DiscoveryServiceTest.php b/tests/lib/OCS/DiscoveryServiceTest.php index fdcdddb0813..f8ec68f6f55 100644 --- a/tests/lib/OCS/DiscoveryServiceTest.php +++ b/tests/lib/OCS/DiscoveryServiceTest.php @@ -19,7 +19,6 @@ * */ - namespace Test\OCS; diff --git a/tests/lib/Preview/GeneratorTest.php b/tests/lib/Preview/GeneratorTest.php index 9bca43a1a7e..c7fe1ea5f8a 100644 --- a/tests/lib/Preview/GeneratorTest.php +++ b/tests/lib/Preview/GeneratorTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Preview; use OC\Preview\Generator; diff --git a/tests/lib/Preview/HEICTest.php b/tests/lib/Preview/HEICTest.php index 63b9038d35d..a3cc37d24fb 100644 --- a/tests/lib/Preview/HEICTest.php +++ b/tests/lib/Preview/HEICTest.php @@ -45,4 +45,4 @@ class HEICTest extends Provider { } -}
\ No newline at end of file +} diff --git a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php index dd98307993f..e52fcbe7c21 100644 --- a/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php +++ b/tests/lib/Repair/ClearGeneratedAvatarCacheTest.php @@ -23,10 +23,10 @@ namespace Test\Repair; -use OCP\IConfig; -use OCP\Migration\IOutput; use OC\Avatar\AvatarManager; use OC\Repair\ClearGeneratedAvatarCache; +use OCP\IConfig; +use OCP\Migration\IOutput; class ClearGeneratedAvatarCacheTest extends \Test\TestCase { diff --git a/tests/lib/Repair/NC11/FixMountStoragesTest.php b/tests/lib/Repair/NC11/FixMountStoragesTest.php index 12e09105038..fe1b75cac9b 100644 --- a/tests/lib/Repair/NC11/FixMountStoragesTest.php +++ b/tests/lib/Repair/NC11/FixMountStoragesTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Repair\NC11; use OC\Repair\NC11\FixMountStorages; diff --git a/tests/lib/Repair/RepairInvalidSharesTest.php b/tests/lib/Repair/RepairInvalidSharesTest.php index 0c67cc992ef..f28d6807d6a 100644 --- a/tests/lib/Repair/RepairInvalidSharesTest.php +++ b/tests/lib/Repair/RepairInvalidSharesTest.php @@ -202,4 +202,3 @@ class RepairInvalidSharesTest extends TestCase { return $this->connection->lastInsertId('*PREFIX*share'); } } - diff --git a/tests/lib/Repair/RepairMimeTypesTest.php b/tests/lib/Repair/RepairMimeTypesTest.php index b9d73d27d00..6579c3213c4 100644 --- a/tests/lib/Repair/RepairMimeTypesTest.php +++ b/tests/lib/Repair/RepairMimeTypesTest.php @@ -6,6 +6,7 @@ * later. * See the COPYING-README file. */ + namespace Test\Repair; use OC\Files\Storage\Temporary; @@ -283,4 +284,3 @@ class RepairMimeTypesTest extends \Test\TestCase { $this->renameMimeTypes($currentMimeTypes, $fixedMimeTypes); } } - diff --git a/tests/lib/Security/Bruteforce/CapabilitiesTest.php b/tests/lib/Security/Bruteforce/CapabilitiesTest.php index 6ebaf79ddaf..e9b998c7bc8 100644 --- a/tests/lib/Security/Bruteforce/CapabilitiesTest.php +++ b/tests/lib/Security/Bruteforce/CapabilitiesTest.php @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Security\Bruteforce; use OC\Security\Bruteforce\Capabilities; diff --git a/tests/lib/Security/Bruteforce/ThrottlerTest.php b/tests/lib/Security/Bruteforce/ThrottlerTest.php index da386db9d2d..e68ae70e152 100644 --- a/tests/lib/Security/Bruteforce/ThrottlerTest.php +++ b/tests/lib/Security/Bruteforce/ThrottlerTest.php @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Security\Bruteforce; use OC\AppFramework\Utility\TimeFactory; diff --git a/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php b/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php index 28b85c3951f..424f620b619 100644 --- a/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php +++ b/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php @@ -53,4 +53,3 @@ class CsrfTokenGeneratorTest extends \Test\TestCase { $this->assertSame('12345678901234567890123456789012', $this->csrfTokenGenerator->generateToken(32)); } } - diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php index 2804ad99c0f..04da057a14c 100644 --- a/tests/lib/Security/CertificateManagerTest.php +++ b/tests/lib/Security/CertificateManagerTest.php @@ -10,7 +10,7 @@ namespace Test\Security; use OC\Files\Storage\Temporary; use OC\Files\View; -use \OC\Security\CertificateManager; +use OC\Security\CertificateManager; use OCP\IConfig; use OCP\ILogger; use OCP\Security\ISecureRandom; diff --git a/tests/lib/Security/CertificateTest.php b/tests/lib/Security/CertificateTest.php index 6f7d7d4a37f..21d1dab4ab8 100644 --- a/tests/lib/Security/CertificateTest.php +++ b/tests/lib/Security/CertificateTest.php @@ -21,7 +21,7 @@ namespace Test\Security; -use \OC\Security\Certificate; +use OC\Security\Certificate; class CertificateTest extends \Test\TestCase { diff --git a/tests/lib/Security/CredentialsManagerTest.php b/tests/lib/Security/CredentialsManagerTest.php index 38da26a21a9..d1cbdcd3366 100644 --- a/tests/lib/Security/CredentialsManagerTest.php +++ b/tests/lib/Security/CredentialsManagerTest.php @@ -21,11 +21,11 @@ namespace Test\Security; +use OC\Security\CredentialsManager; use OC\SystemConfig; +use OCP\IDBConnection; use OCP\ILogger; -use \OCP\Security\ICrypto; -use \OCP\IDBConnection; -use \OC\Security\CredentialsManager; +use OCP\Security\ICrypto; class CredentialsManagerTest extends \Test\TestCase { diff --git a/tests/lib/Security/CryptoTest.php b/tests/lib/Security/CryptoTest.php index 356d504f4b3..ff164cddc9d 100644 --- a/tests/lib/Security/CryptoTest.php +++ b/tests/lib/Security/CryptoTest.php @@ -8,7 +8,7 @@ namespace Test\Security; -use \OC\Security\Crypto; +use OC\Security\Crypto; class CryptoTest extends \Test\TestCase { diff --git a/tests/lib/Security/IdentityProof/KeyTest.php b/tests/lib/Security/IdentityProof/KeyTest.php index 0468afe633a..bb550bd1b2a 100644 --- a/tests/lib/Security/IdentityProof/KeyTest.php +++ b/tests/lib/Security/IdentityProof/KeyTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Security\IdentityProof; use OC\Security\IdentityProof\Key; diff --git a/tests/lib/Security/IdentityProof/SignerTest.php b/tests/lib/Security/IdentityProof/SignerTest.php index f12e6d94be3..114c03348f6 100644 --- a/tests/lib/Security/IdentityProof/SignerTest.php +++ b/tests/lib/Security/IdentityProof/SignerTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Security\IdentityProof; use OC\Security\IdentityProof\Key; diff --git a/tests/lib/Security/SecureRandomTest.php b/tests/lib/Security/SecureRandomTest.php index 40431c89795..500e18d0ca6 100644 --- a/tests/lib/Security/SecureRandomTest.php +++ b/tests/lib/Security/SecureRandomTest.php @@ -8,7 +8,7 @@ namespace Test\Security; -use \OC\Security\SecureRandom; +use OC\Security\SecureRandom; class SecureRandomTest extends \Test\TestCase { diff --git a/tests/lib/Security/TrustedDomainHelperTest.php b/tests/lib/Security/TrustedDomainHelperTest.php index 86420e22c21..3fe0889b796 100644 --- a/tests/lib/Security/TrustedDomainHelperTest.php +++ b/tests/lib/Security/TrustedDomainHelperTest.php @@ -8,7 +8,7 @@ namespace Test\Security; -use \OC\Security\TrustedDomainHelper; +use OC\Security\TrustedDomainHelper; use OCP\IConfig; /** diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index ed02061c595..8d1c9f768e8 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -23,10 +23,10 @@ namespace OCA\Settings\Tests\AppInfo; -use OCA\Settings\Admin\Sharing; use OC\Settings\Manager; -use OCA\Settings\Personal\Security; use OC\Settings\Section; +use OCA\Settings\Admin\Sharing; +use OCA\Settings\Personal\Security; use OCP\IDBConnection; use OCP\IL10N; use OCP\ILogger; diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index 8f725022eda..a9852882fa8 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -19,21 +19,22 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + namespace Test\Share20; +use OC\Share20\DefaultShareProvider; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Defaults; use OCP\Files\File; use OCP\Files\Folder; +use OCP\Files\IRootFolder; use OCP\IDBConnection; use OCP\IGroup; +use OCP\IGroupManager; use OCP\IL10N; use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; -use OCP\IGroupManager; -use OCP\Files\IRootFolder; -use OC\Share20\DefaultShareProvider; use OCP\Mail\IMailer; use OCP\Share\IShare; diff --git a/tests/lib/Share20/LegacyHooksTest.php b/tests/lib/Share20/LegacyHooksTest.php index 5fc6a447047..057173c4f33 100644 --- a/tests/lib/Share20/LegacyHooksTest.php +++ b/tests/lib/Share20/LegacyHooksTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Share20; use OC\Share20\LegacyHooks; diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 4a7686acd35..26008c2a3de 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -18,39 +18,40 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + namespace Test\Share20; use OC\Files\Mount\MoveableMount; use OC\HintException; use OC\Share20\DefaultShareProvider; +use OC\Share20\Exception; +use OC\Share20\Manager; +use OC\Share20\Share; use OCP\Files\File; use OCP\Files\Folder; use OCP\Files\IRootFolder; +use OCP\Files\Mount\IMountManager; use OCP\Files\Mount\IMountPoint; use OCP\Files\Node; use OCP\Files\Storage; +use OCP\IConfig; use OCP\IGroup; +use OCP\IGroupManager; +use OCP\IL10N; +use OCP\ILogger; use OCP\IServerContainer; use OCP\IURLGenerator; use OCP\IUser; + use OCP\IUserManager; use OCP\L10N\IFactory; use OCP\Mail\IMailer; +use OCP\Security\IHasher; +use OCP\Security\ISecureRandom; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IProviderFactory; use OCP\Share\IShare; -use OC\Share20\Manager; -use OC\Share20\Exception; - -use OC\Share20\Share; -use OCP\IL10N; -use OCP\ILogger; -use OCP\IConfig; use OCP\Share\IShareProvider; -use OCP\Security\ISecureRandom; -use OCP\Security\IHasher; -use OCP\Files\Mount\IMountManager; -use OCP\IGroupManager; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; diff --git a/tests/lib/Share20/ShareHelperTest.php b/tests/lib/Share20/ShareHelperTest.php index 69609f9f724..39141418f35 100644 --- a/tests/lib/Share20/ShareHelperTest.php +++ b/tests/lib/Share20/ShareHelperTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Share20; use OC\Share20\ShareHelper; diff --git a/tests/lib/Share20/ShareTest.php b/tests/lib/Share20/ShareTest.php index fbdf8e5c15b..9e5c4970d3b 100644 --- a/tests/lib/Share20/ShareTest.php +++ b/tests/lib/Share20/ShareTest.php @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + namespace Test\Share20; use OCP\Files\IRootFolder; diff --git a/tests/lib/SubAdminTest.php b/tests/lib/SubAdminTest.php index 4c0b030c44b..8b293426e75 100644 --- a/tests/lib/SubAdminTest.php +++ b/tests/lib/SubAdminTest.php @@ -18,6 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + namespace Test; /** diff --git a/tests/lib/SystemTag/SystemTagManagerTest.php b/tests/lib/SystemTag/SystemTagManagerTest.php index f81bbaf1643..41c838914c7 100644 --- a/tests/lib/SystemTag/SystemTagManagerTest.php +++ b/tests/lib/SystemTag/SystemTagManagerTest.php @@ -13,13 +13,13 @@ namespace Test\SystemTag; use OC\SystemTag\SystemTagManager; use OC\SystemTag\SystemTagObjectMapper; use OCP\IDBConnection; +use OCP\IGroupManager; use OCP\IUser; +use OCP\IUserManager; use OCP\SystemTag\ISystemTag; use OCP\SystemTag\ISystemTagManager; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Test\TestCase; -use OCP\IUserManager; -use OCP\IGroupManager; /** * Class TestSystemTagManager diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php index a928f043ed3..790d1f44e1b 100644 --- a/tests/lib/Template/CSSResourceLocatorTest.php +++ b/tests/lib/Template/CSSResourceLocatorTest.php @@ -25,16 +25,16 @@ namespace Test\Template; use OC\Files\AppData\AppData; use OC\Files\AppData\Factory; +use OC\Template\CSSResourceLocator; +use OC\Template\IconsCacher; +use OC\Template\SCSSCacher; +use OCA\Theming\ThemingDefaults; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Files\IAppData; use OCP\ICacheFactory; +use OCP\IConfig; use OCP\ILogger; use OCP\IURLGenerator; -use OCP\IConfig; -use OCA\Theming\ThemingDefaults; -use OC\Template\IconsCacher; -use OC\Template\SCSSCacher; -use OC\Template\CSSResourceLocator; class CSSResourceLocatorTest extends \Test\TestCase { /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/tests/lib/Template/IconsCacherTest.php b/tests/lib/Template/IconsCacherTest.php index 37624356443..50b678da6d3 100644 --- a/tests/lib/Template/IconsCacherTest.php +++ b/tests/lib/Template/IconsCacherTest.php @@ -27,6 +27,7 @@ namespace Test\Template; use OC\Files\AppData\AppData; use OC\Files\AppData\Factory; use OC\Template\IconsCacher; +use OC_App; use OCA\Theming\ThemingDefaults; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Files\IAppData; @@ -38,7 +39,6 @@ use OCP\ICacheFactory; use OCP\IConfig; use OCP\ILogger; use OCP\IURLGenerator; -use OC_App; class IconsCacherTest extends \Test\TestCase { /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/tests/lib/Template/JSCombinerTest.php b/tests/lib/Template/JSCombinerTest.php index 6eaedccbe89..51b15b80405 100644 --- a/tests/lib/Template/JSCombinerTest.php +++ b/tests/lib/Template/JSCombinerTest.php @@ -20,6 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ + namespace Test\Template; use function foo\func; diff --git a/tests/lib/Template/JSResourceLocatorTest.php b/tests/lib/Template/JSResourceLocatorTest.php index f5dff62729f..400637ae960 100644 --- a/tests/lib/Template/JSResourceLocatorTest.php +++ b/tests/lib/Template/JSResourceLocatorTest.php @@ -23,13 +23,13 @@ namespace Test\Template; +use OC\SystemConfig; use OC\Template\JSCombiner; +use OC\Template\JSResourceLocator; use OCP\Files\IAppData; use OCP\ICacheFactory; -use OCP\IURLGenerator; -use OC\SystemConfig; use OCP\ILogger; -use OC\Template\JSResourceLocator; +use OCP\IURLGenerator; class JSResourceLocatorTest extends \Test\TestCase { /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php index d4d60c2dc1b..421046b38f3 100644 --- a/tests/lib/Template/SCSSCacherTest.php +++ b/tests/lib/Template/SCSSCacherTest.php @@ -25,8 +25,9 @@ namespace Test\Template; use OC\Files\AppData\AppData; use OC\Files\AppData\Factory; -use OC\Template\SCSSCacher; use OC\Template\IconsCacher; +use OC\Template\SCSSCacher; +use OC_App; use OCA\Theming\ThemingDefaults; use OCP\AppFramework\Utility\ITimeFactory; use OCP\Files\IAppData; @@ -38,7 +39,6 @@ use OCP\ICacheFactory; use OCP\IConfig; use OCP\ILogger; use OCP\IURLGenerator; -use OC_App; class SCSSCacherTest extends \Test\TestCase { /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ diff --git a/tests/lib/Traits/EncryptionTrait.php b/tests/lib/Traits/EncryptionTrait.php index ba759a51a28..1f389fc82c8 100644 --- a/tests/lib/Traits/EncryptionTrait.php +++ b/tests/lib/Traits/EncryptionTrait.php @@ -9,11 +9,11 @@ namespace Test\Traits; use OC\Encryption\EncryptionWrapper; +use OC\Files\Filesystem; use OC\Memcache\ArrayCache; use OCA\Encryption\AppInfo\Application; use OCA\Encryption\KeyManager; use OCA\Encryption\Users\Setup; -use OC\Files\Filesystem; /** * Enables encryption diff --git a/tests/lib/UpdaterTest.php b/tests/lib/UpdaterTest.php index afc9f9b1f86..47028cf3f18 100644 --- a/tests/lib/UpdaterTest.php +++ b/tests/lib/UpdaterTest.php @@ -23,10 +23,10 @@ namespace Test; use OC\Installer; +use OC\IntegrityCheck\Checker; use OC\Updater; use OCP\IConfig; use OCP\ILogger; -use OC\IntegrityCheck\Checker; class UpdaterTest extends TestCase { /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */ diff --git a/tests/lib/User/DatabaseTest.php b/tests/lib/User/DatabaseTest.php index 666833ec44c..feba7a6926d 100644 --- a/tests/lib/User/DatabaseTest.php +++ b/tests/lib/User/DatabaseTest.php @@ -22,9 +22,9 @@ namespace Test\User; use OC\HintException; +use OC\User\User; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; -use OC\User\User; /** * Class DatabaseTest diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index a60f89fb457..a37181c504c 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -15,7 +15,6 @@ use OC\Authentication\Token\IProvider; use OC\Authentication\Token\IToken; use OC\Security\Bruteforce\Throttler; use OC\Session\Memory; -use OCP\User\Events\PostLoginEvent; use OC\User\Manager; use OC\User\Session; use OC\User\User; @@ -30,6 +29,7 @@ use OCP\IUser; use OCP\Lockdown\ILockdownManager; use OCP\Security\ICrypto; use OCP\Security\ISecureRandom; +use OCP\User\Events\PostLoginEvent; use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\EventDispatcher\EventDispatcherInterface; diff --git a/tests/lib/Util/User/Dummy.php b/tests/lib/Util/User/Dummy.php index 3db519cedfc..4771983e9bc 100644 --- a/tests/lib/Util/User/Dummy.php +++ b/tests/lib/Util/User/Dummy.php @@ -27,7 +27,7 @@ namespace Test\Util\User; -use \OC\User\Backend; +use OC\User\Backend; /** * dummy user backend, does not keep state, only for testing use |