Skip to content
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

Add return type to setup() and teardown() #133

Merged
merged 1 commit into from
Feb 26, 2019
Merged

Conversation

cj-watts
Copy link
Contributor

Fix compatibility with phpunit 8.0.2

@coveralls
Copy link

coveralls commented Feb 12, 2019

Coverage Status

Coverage decreased (-0.3%) to 28.675% when pulling 587f5ee on rocketcrazy07:patch-1 into 9f3525a on 10up:master.

@jeffpaul
Copy link
Member

@rocketcrazy07 would you please look into the build failures on this? Thanks!

@cj-watts cj-watts force-pushed the patch-1 branch 2 times, most recently from 1ec0ad3 to dcdab67 Compare February 13, 2019 17:58
@cj-watts
Copy link
Contributor Author

Could I get the contents of build/logs/clover.xml from the build server so I can test this fully before making another commit?

@ericmann
Copy link
Collaborator

> phpunit --coverage-clover build/logs/clover.xml
PHPUnit 8.0.2 by Sebastian Bergmann and contributors.
Runtime:       PHP 7.2.15 with Xdebug 2.6.1
Configuration: /home/travis/build/10up/wp_mock/phpunit.xml.dist
PHP Fatal error:  Class WP_Mock\Tools\Constraints\IsEqualHtml may not inherit from final class (PHPUnit\Framework\Constraint\IsEqual) in /home/travis/build/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php on line 7
PHP Stack trace:
PHP   1. {main}() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/phpunit:0
PHP   2. PHPUnit\TextUI\Command::main() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/phpunit:61
PHP   3. PHPUnit\TextUI\Command->run() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/TextUI/Command.php:164
PHP   4. PHPUnit\TextUI\TestRunner->doRun() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/TextUI/Command.php:208
PHP   5. PHPUnit\Framework\TestSuite->run() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:632
PHP   6. PHPUnit\Framework\TestSuite->run() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/Framework/TestSuite.php:761
PHP   7. DeprecatedMethodsTest->run() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/Framework/TestSuite.php:761
PHP   8. PHPUnit\Framework\TestResult->run() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/Framework/TestCase.php:795
PHP   9. SebastianBergmann\CodeCoverage\CodeCoverage->start() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/Framework/TestResult.php:640
PHP  10. SebastianBergmann\CodeCoverage\CodeCoverage->initializeData() /home/travis/build/10up/wp_mock/vendor/phpunit/php-code-coverage/src/CodeCoverage.php:241
PHP  11. include_once() /home/travis/build/10up/wp_mock/vendor/phpunit/php-code-coverage/src/CodeCoverage.php:961
Fatal error: Class WP_Mock\Tools\Constraints\IsEqualHtml may not inherit from final class (PHPUnit\Framework\Constraint\IsEqual) in /home/travis/build/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php on line 7
Call Stack:
    0.0001     418024   1. {main}() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/phpunit:0
    0.0050    1154480   2. PHPUnit\TextUI\Command::main() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/phpunit:61
    0.0050    1163272   3. PHPUnit\TextUI\Command->run() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/TextUI/Command.php:164
    0.0300    3234440   4. PHPUnit\TextUI\TestRunner->doRun() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/TextUI/Command.php:208
    0.0380    3784576   5. PHPUnit\Framework\TestSuite->run() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:632
    0.0387    3784768   6. PHPUnit\Framework\TestSuite->run() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/Framework/TestSuite.php:761
    0.0400    3785280   7. DeprecatedMethodsTest->run() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/Framework/TestSuite.php:761
    0.0400    3785280   8. PHPUnit\Framework\TestResult->run() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/Framework/TestCase.php:795
    0.0402    3796360   9. SebastianBergmann\CodeCoverage\CodeCoverage->start() /home/travis/build/10up/wp_mock/vendor/phpunit/phpunit/src/Framework/TestResult.php:640
    0.0402    3796360  10. SebastianBergmann\CodeCoverage\CodeCoverage->initializeData() /home/travis/build/10up/wp_mock/vendor/phpunit/php-code-coverage/src/CodeCoverage.php:241
    0.0515    4212592  11. include_once('/home/travis/build/10up/wp_mock/php/WP_Mock/Tools/Constraints/IsEqualHtml.php') /home/travis/build/10up/wp_mock/vendor/phpunit/php-code-coverage/src/CodeCoverage.php:961

@cj-watts
Copy link
Contributor Author

The code coverage reduction is due phpunit marking certain classes as final and needing to add a line or 2 so Mockery can properly mock the object. If there is anything else you are waiting on please let me know I am eager to get this merged in so I can help with other things as well.

@ericmann
Copy link
Collaborator

ericmann commented Feb 20, 2019

If there is anything else you are waiting on

Just some time to review. If I don't get this merged by Monday, ping me back please.

@cj-watts
Copy link
Contributor Author

@ericmann

@ericmann
Copy link
Collaborator

Thanks for the reminder. Fell off my radar. Will address today.

@ericmann ericmann merged commit 587f5ee into 10up:master Feb 26, 2019
ericmann added a commit that referenced this pull request Feb 26, 2019
ericmann pushed a commit that referenced this pull request Feb 26, 2019
ericmann added a commit that referenced this pull request Feb 26, 2019
@cj-watts cj-watts deleted the patch-1 branch February 27, 2019 20:38
@jeffpaul jeffpaul added this to the 0.4.1 milestone Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants