-
Notifications
You must be signed in to change notification settings - Fork 498
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
Fix unit tests by aliasing PHPUnit_Framework_TestCase with namespaced name #280
Conversation
… name This change is intended to work in php 5.2+, the lowest version .travis.yml indicates this supports. If PHPUnit_Framework_TestCase does not exist, check if PHPUnit\Framework\TestCase does exist, and if so, alias it. - Different versions of phpunit may be required for different php versions, so don't try standardizing for now. Fixes WordPress#279
https://travis-ci.org/rmccue/Requests/jobs/239492433 failed for the below reason https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html
Will fix this later, or rebase if another PR fixes that. |
@TysonAndre The way I read that message is that when you call Based on sebastianbergmann/phpunit#2074 it seems like we just need to use |
Add setExpectedException shim for PHPUnit 6
Codecov Report
@@ Coverage Diff @@
## master #280 +/- ##
=======================================
Coverage 92.11% 92.11%
=======================================
Files 21 21
Lines 1762 1762
=======================================
Hits 1623 1623
Misses 139 139 Continue to review full report at Codecov.
|
Actually fix unit tests
🙌 Finally passing! Needs a review from a committer though :) |
$this->assertFalse(isset($iri->nonexistant_prop)); | ||
$should_fail = $iri->nonexistant_prop; | ||
$this->assertFalse(isset($iri->nonexistent_prop)); | ||
$should_fail = $iri->nonexistent_prop; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(These changes aren't relevant, I just happened to notice the misspelling as I was fixing it.)
@TysonAndre Thanks for helping out with this issue (and on the others) by the way; you now have commit access. :) |
I've tried to get the tests running a few times and it keeps bailing on the PHPUnit 6.2.3
|
The problem is now that phpenv fails on each job. Just testing to figure out why.
Screw it. I'm done. |
Thanks for this @TysonAndre, we ended up fixing it finally in #303. |
This change is intended to work in php 5.2+, the lowest version .travis.yml
indicates this supports.
If PHPUnit_Framework_TestCase does not exist, check if
PHPUnit\Framework\TestCase does exist, and if so, alias it.
versions, so don't try standardizing for now.
Fixes #279