-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declare testCase methods void to match modern phpunit declaration #34961
Conversation
Codecov Report
@@ Coverage Diff @@
## master #34961 +/- ##
============================================
- Coverage 65.38% 65.38% -0.01%
Complexity 18592 18592
============================================
Files 1213 1213
Lines 70408 70408
Branches 1295 1295
============================================
- Hits 46036 46035 -1
- Misses 23998 23999 +1
Partials 374 374
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #34961 +/- ##
============================================
- Coverage 65.38% 65.38% -0.01%
Complexity 18592 18592
============================================
Files 1213 1213
Lines 70408 70408
Branches 1295 1295
============================================
- Hits 46036 46035 -1
- Misses 23998 23999 +1
Partials 374 374
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #34961 +/- ##
=============================================
- Coverage 67.18% 49.03% -18.16%
=============================================
Files 1168 109 -1059
Lines 63575 10535 -53040
Branches 0 1289 +1289
=============================================
- Hits 42716 5166 -37550
+ Misses 20859 4991 -15868
- Partials 0 378 +378
Continue to review full report at Codecov.
|
079ab77
to
7232f02
Compare
7232f02
to
230d59d
Compare
8ae6dc8
to
7fa42d2
Compare
530d1db
to
88283de
Compare
Updated and rebased on 2019-07-02 and passing. |
88283de
to
1fa0ce8
Compare
6026ba0
to
fdff142
Compare
fdff142
to
faf4c65
Compare
As discussed in #35777 the master branch will from now on hold the ownCloud 10 codebase. This PR targetted ownCloud 11 which is postponed to a far distant future. Because of that I'm closing this PR and kindly ask you to re-submit this PR in a few days. Thanks a lot for your patience |
Description
Add the
void
return type to testsetUp()
tearDown()
etc methods ofphpunit
. This makes them compatible with PHPunit 8.0Note: this will not backport to
stable10
until PHP 5.6 and 7.0 support is dropped. Doing this inmaster
also would mean that apps which inherit test classes from core would have to put thevoid
return type in. And that would stop their unit tests from working against corestable10
. It would be very annoying to have to make separatestable10
branches in lots of apps just for this! So merging this is "not a good thing" just yet.Note: I was getting
files_external_ftp
unit tests to pass on Travis which has PHPunit 8.0, and used this just to see if the unit tests would pass - they do.Motivation and Context
On Travis (for example) we started getting PHPunit 8.0 by default which puts return type declarations on some methods like
function setUp(): void
and so when we inherit from that, PHP complains if we do not also specify the return typevoid
on the child class.How Has This Been Tested?
CI and files_external_ftp unit tests with Travis
Types of changes
Checklist:
Open tasks: