diff options
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/Activity/Filter/GenericTest.php | 2 | ||||
-rw-r--r-- | apps/files/tests/Activity/ProviderTest.php | 1 | ||||
-rw-r--r-- | apps/files/tests/Activity/Setting/GenericTest.php | 1 | ||||
-rw-r--r-- | apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php | 1 | ||||
-rw-r--r-- | apps/files/tests/BackgroundJob/ScanFilesTest.php | 7 | ||||
-rw-r--r-- | apps/files/tests/Command/DeleteOrphanedFilesTest.php | 2 | ||||
-rw-r--r-- | apps/files/tests/Controller/ApiControllerTest.php | 1 | ||||
-rw-r--r-- | apps/files/tests/Controller/ViewControllerTest.php | 28 | ||||
-rw-r--r-- | apps/files/tests/HelperTest.php | 3 | ||||
-rw-r--r-- | apps/files/tests/Service/TagServiceTest.php | 6 |
10 files changed, 22 insertions, 30 deletions
diff --git a/apps/files/tests/Activity/Filter/GenericTest.php b/apps/files/tests/Activity/Filter/GenericTest.php index 46b977bb27f..eb55ab2699f 100644 --- a/apps/files/tests/Activity/Filter/GenericTest.php +++ b/apps/files/tests/Activity/Filter/GenericTest.php @@ -24,7 +24,6 @@ namespace OCA\Files\Tests\Activity\Filter; - use OCA\Files\Activity\Filter\Favorites; use OCA\Files\Activity\Filter\FileChanges; use OCP\Activity\IFilter; @@ -37,7 +36,6 @@ use Test\TestCase; * @group DB */ class GenericTest extends TestCase { - public function dataFilters() { return [ [Favorites::class], diff --git a/apps/files/tests/Activity/ProviderTest.php b/apps/files/tests/Activity/ProviderTest.php index 5e4b18c0bb1..4521dea33ce 100644 --- a/apps/files/tests/Activity/ProviderTest.php +++ b/apps/files/tests/Activity/ProviderTest.php @@ -24,7 +24,6 @@ namespace OCA\Files\Tests\Activity; - use OCA\Files\Activity\Provider; use OCP\Activity\IEvent; use OCP\Activity\IEventMerger; diff --git a/apps/files/tests/Activity/Setting/GenericTest.php b/apps/files/tests/Activity/Setting/GenericTest.php index 0ebb29d9de3..e741a3e02a8 100644 --- a/apps/files/tests/Activity/Setting/GenericTest.php +++ b/apps/files/tests/Activity/Setting/GenericTest.php @@ -34,7 +34,6 @@ use OCP\Activity\ISetting; use Test\TestCase; class GenericTest extends TestCase { - public function dataSettings() { return [ [FavoriteAction::class], diff --git a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php index b7ef5387090..13ccc678b36 100644 --- a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php +++ b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php @@ -257,5 +257,4 @@ class DeleteOrphanedItemsJobTest extends \Test\TestCase { ->execute(); $this->cleanMapping('comments_read_markers'); } - } diff --git a/apps/files/tests/BackgroundJob/ScanFilesTest.php b/apps/files/tests/BackgroundJob/ScanFilesTest.php index f2220e6276d..75557955d6a 100644 --- a/apps/files/tests/BackgroundJob/ScanFilesTest.php +++ b/apps/files/tests/BackgroundJob/ScanFilesTest.php @@ -52,8 +52,8 @@ class ScanFilesTest extends TestCase { $this->scanFiles = $this->getMockBuilder('\OCA\Files\BackgroundJob\ScanFiles') ->setConstructorArgs([ - $this->config, - $this->userManager, + $this->config, + $this->userManager, ]) ->setMethods(['runScanner']) ->getMock(); @@ -105,7 +105,7 @@ class ScanFilesTest extends TestCase { ->method('search') ->with('', 500, 50) ->willReturn([ - $fakeUser + $fakeUser ]); $this->config ->expects($this->at(2)) @@ -150,5 +150,4 @@ class ScanFilesTest extends TestCase { $this->invokePrivate($this->scanFiles, 'run', [[]]); } - } diff --git a/apps/files/tests/Command/DeleteOrphanedFilesTest.php b/apps/files/tests/Command/DeleteOrphanedFilesTest.php index 8d6098ff18d..e0a8a72aba3 100644 --- a/apps/files/tests/Command/DeleteOrphanedFilesTest.php +++ b/apps/files/tests/Command/DeleteOrphanedFilesTest.php @@ -72,7 +72,7 @@ class DeleteOrphanedFilesTest extends TestCase { protected function tearDown(): void { $userManager = \OC::$server->getUserManager(); $user1 = $userManager->get($this->user1); - if($user1) { + if ($user1) { $user1->delete(); } diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php index b35d9d7b95d..d347cffdd81 100644 --- a/apps/files/tests/Controller/ApiControllerTest.php +++ b/apps/files/tests/Controller/ApiControllerTest.php @@ -246,5 +246,4 @@ class ApiControllerTest extends TestCase { $this->assertEquals($expected, $actual); } - } diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index 8f2f8fe9ec1..50eb40079a0 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -99,17 +99,17 @@ class ViewControllerTest extends TestCase { $this->activityHelper = $this->createMock(Helper::class); $this->viewController = $this->getMockBuilder('\OCA\Files\Controller\ViewController') ->setConstructorArgs([ - 'files', - $this->request, - $this->urlGenerator, - $this->l10n, - $this->config, - $this->eventDispatcher, - $this->userSession, - $this->appManager, - $this->rootFolder, - $this->activityHelper, - ]) + 'files', + $this->request, + $this->urlGenerator, + $this->l10n, + $this->config, + $this->eventDispatcher, + $this->userSession, + $this->appManager, + $this->rootFolder, + $this->activityHelper, + ]) ->setMethods([ 'getStorageInfo', 'renderScript' @@ -138,7 +138,7 @@ class ViewControllerTest extends TestCase { [$this->user->getUID(), 'files', 'show_grid', true], ]); - $this->config + $this->config ->expects($this->any()) ->method('getAppValue') ->willReturnArgument(2); @@ -262,14 +262,14 @@ class ViewControllerTest extends TestCase { 'classes' => 'collapsible', 'sublist' => [ [ - 'id' => 'sharingout', + 'id' => 'sharingout', 'appname' => 'files_sharing', 'script' => 'list.php', 'order' => 16, 'name' => \OC::$server->getL10N('files_sharing')->t('Shared with others'), ], [ - 'id' => 'sharingin', + 'id' => 'sharingin', 'appname' => 'files_sharing', 'script' => 'list.php', 'order' => 15, diff --git a/apps/files/tests/HelperTest.php b/apps/files/tests/HelperTest.php index 6b824e8ead8..974d1187f2a 100644 --- a/apps/files/tests/HelperTest.php +++ b/apps/files/tests/HelperTest.php @@ -31,7 +31,6 @@ * Class Helper */ class HelperTest extends \Test\TestCase { - private function makeFileInfo($name, $size, $mtime, $isDir = false) { return new \OC\Files\FileInfo( '/' . $name, @@ -62,7 +61,7 @@ class HelperTest extends \Test\TestCase { ]; } - function sortDataProvider() { + public function sortDataProvider() { return [ [ 'name', diff --git a/apps/files/tests/Service/TagServiceTest.php b/apps/files/tests/Service/TagServiceTest.php index 8870c315947..ca6d98909ed 100644 --- a/apps/files/tests/Service/TagServiceTest.php +++ b/apps/files/tests/Service/TagServiceTest.php @@ -111,13 +111,14 @@ class TagServiceTest extends \Test\TestCase { ]) ->setMethods($methods) ->getMock(); - } protected function tearDown(): void { \OC_User::setUserId(''); $user = \OC::$server->getUserManager()->get($this->user); - if ($user !== null) { $user->delete(); } + if ($user !== null) { + $user->delete(); + } } public function testUpdateFileTags() { @@ -162,7 +163,6 @@ class TagServiceTest extends \Test\TestCase { } public function testFavoriteActivity() { - $subdir = $this->root->newFolder('subdir'); $file = $subdir->newFile('test.txt'); |