This repository was archived by the owner on Jan 29, 2020. It is now read-only.
add phpunit 6 require - #40
Merged
Merged
Conversation
froschdesign
suggested changes
Feb 3, 2017
| "require": { | ||
| "php": "^5.6 || ^7.0", | ||
| "phpunit/phpunit": "^4.0 || ^5.0", | ||
| "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0", |
Member
There was a problem hiding this comment.
This will not work with the current version of zend-test, because in PHPUnit 6 the class PHPUnit_Framework_TestCase no longer exists.
Contributor
Author
There was a problem hiding this comment.
we can change the code with class_alias:
use PHPUnit\Framework\TestCase;
if (! class_exists(TestCase::class)) {
class_alias(\PHPUnit_Framework_TestCase::class, TestCase::class);
}
abstract class AbstractControllerTestCase extends TestCase
Ocramius
approved these changes
Feb 4, 2017
Member
|
@samsonasik I think this should target |
Contributor
Author
|
@Ocramius done ;) |
Member
|
@samsonasik needs a rebase now :P |
Contributor
Author
|
@Ocramius done ;), rebased ;) |
Member
|
👍 thanks! |
Member
|
@samsonasik and @Ocramius |
|
|
||
| if (! class_exists(ExpectationFailedException::class)) { | ||
| class_alias(\PHPUnit_Framework_ExpectationFailedException::class, ExpectationFailedException::class); | ||
| } |
Member
There was a problem hiding this comment.
Ugh, wish I'd had a chance to review before merge.
All these class_alias calls should likely be in a single file that is added via an autoload_dev section of the composer.json. That way the aliases are created when needed, and outside the class file declarations themselves.
2 tasks
weierophinney
added a commit
that referenced
this pull request
May 1, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.