summaryrefslogtreecommitdiffstats
path: root/apps/files/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-21 16:40:38 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 13:34:41 +0100
commitc007ca624f4a95e1a491221d425fcb2fa6e5589a (patch)
treeb60aa133b438eb116ac3579283aa8a7967efd12b /apps/files/tests
parente0f32814e33f9ebb8c42744611048cbfac1eb588 (diff)
downloadnextcloud-server-c007ca624f4a95e1a491221d425fcb2fa6e5589a.tar.gz
nextcloud-server-c007ca624f4a95e1a491221d425fcb2fa6e5589a.zip
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/Activity/ProviderTest.php2
-rw-r--r--apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php2
-rw-r--r--apps/files/tests/BackgroundJob/ScanFilesTest.php2
-rw-r--r--apps/files/tests/Command/DeleteOrphanedFilesTest.php4
-rw-r--r--apps/files/tests/Controller/ApiControllerTest.php2
-rw-r--r--apps/files/tests/Controller/ViewControllerTest.php2
-rw-r--r--apps/files/tests/Service/TagServiceTest.php4
7 files changed, 9 insertions, 9 deletions
diff --git a/apps/files/tests/Activity/ProviderTest.php b/apps/files/tests/Activity/ProviderTest.php
index d3738ae41a7..da1f014ad05 100644
--- a/apps/files/tests/Activity/ProviderTest.php
+++ b/apps/files/tests/Activity/ProviderTest.php
@@ -55,7 +55,7 @@ class ProviderTest extends TestCase {
/** @var IEventMerger|\PHPUnit_Framework_MockObject_MockObject */
protected $eventMerger;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->l10nFactory = $this->createMock(IFactory::class);
diff --git a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php
index bf4e78d6b21..4b0496a1aa6 100644
--- a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php
+++ b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php
@@ -38,7 +38,7 @@ class DeleteOrphanedItemsJobTest extends \Test\TestCase {
/** @var \OCP\IDBConnection */
protected $connection;
- protected function setup() {
+ protected function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
}
diff --git a/apps/files/tests/BackgroundJob/ScanFilesTest.php b/apps/files/tests/BackgroundJob/ScanFilesTest.php
index a75e54edfee..8539c6ba7d3 100644
--- a/apps/files/tests/BackgroundJob/ScanFilesTest.php
+++ b/apps/files/tests/BackgroundJob/ScanFilesTest.php
@@ -42,7 +42,7 @@ class ScanFilesTest extends TestCase {
/** @var ScanFiles */
private $scanFiles;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
diff --git a/apps/files/tests/Command/DeleteOrphanedFilesTest.php b/apps/files/tests/Command/DeleteOrphanedFilesTest.php
index 684192858e7..c3f7d8712ac 100644
--- a/apps/files/tests/Command/DeleteOrphanedFilesTest.php
+++ b/apps/files/tests/Command/DeleteOrphanedFilesTest.php
@@ -55,7 +55,7 @@ class DeleteOrphanedFilesTest extends TestCase {
*/
private $user1;
- protected function setup() {
+ protected function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
@@ -68,7 +68,7 @@ class DeleteOrphanedFilesTest extends TestCase {
$this->command = new DeleteOrphanedFiles($this->connection);
}
- protected function tearDown() {
+ protected function tearDown(): void {
$userManager = \OC::$server->getUserManager();
$user1 = $userManager->get($this->user1);
if($user1) {
diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php
index 22daf7c23b4..e5fbe7d3868 100644
--- a/apps/files/tests/Controller/ApiControllerTest.php
+++ b/apps/files/tests/Controller/ApiControllerTest.php
@@ -68,7 +68,7 @@ class ApiControllerTest extends TestCase {
/** @var Folder|\PHPUnit_Framework_MockObject_MockObject */
private $userFolder;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->request = $this->getMockBuilder(IRequest::class)
diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php
index 4de56082e98..c57be81b487 100644
--- a/apps/files/tests/Controller/ViewControllerTest.php
+++ b/apps/files/tests/Controller/ViewControllerTest.php
@@ -76,7 +76,7 @@ class ViewControllerTest extends TestCase {
/** @var Helper|\PHPUnit_Framework_MockObject_MockObject */
private $activityHelper;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->request = $this->getMockBuilder(IRequest::class)->getMock();
$this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->getMock();
diff --git a/apps/files/tests/Service/TagServiceTest.php b/apps/files/tests/Service/TagServiceTest.php
index 709ba3b9c98..4590277aeb4 100644
--- a/apps/files/tests/Service/TagServiceTest.php
+++ b/apps/files/tests/Service/TagServiceTest.php
@@ -70,7 +70,7 @@ class TagServiceTest extends \Test\TestCase {
*/
private $tagger;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->user = static::getUniqueID('user');
$this->activityManager = $this->createMock(IManager::class);
@@ -112,7 +112,7 @@ class TagServiceTest extends \Test\TestCase {
}
- protected function tearDown() {
+ protected function tearDown(): void {
\OC_User::setUserId('');
$user = \OC::$server->getUserManager()->get($this->user);
if ($user !== null) { $user->delete(); }