Skip to content

PHPUnit 6 support? #20

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

Closed
GaryJones opened this issue Feb 24, 2017 · 2 comments
Closed

PHPUnit 6 support? #20

GaryJones opened this issue Feb 24, 2017 · 2 comments

Comments

@GaryJones
Copy link
Contributor

Are there plans to support PHPUnit 6? The PHPUnit code is now namespaced.

@allejo
Copy link

allejo commented Jun 21, 2017

In the mean time, aliasing the classes in my test bootstrap.php works:

$phpunitAliases = [
    '\PHPUnit\Framework\Test' => '\PHPUnit_Framework_Test',
    '\PHPUnit\Framework\TestListener' => '\PHPUnit_Framework_TestListener',
    '\PHPUnit\Framework\Warning' => '\PHPUnit_Framework_Warning',
    '\PHPUnit\Framework\AssertionFailedError' => '\PHPUnit_Framework_AssertionFailedError',
    '\PHPUnit\Framework\TestSuite' => '\PHPUnit_Framework_TestSuite',
];

foreach ($phpunitAliases as $namespaced => $alias) {
    if (!class_exists($alias)) {
        class_alias($namespaced, $alias);
    }
}

@dborsatto
Copy link
Contributor

dborsatto commented Jun 30, 2017

The problem with aliasing is that if other packages you have installed require PHPUnit 6, installation will fail because of conflicting requirements 🙁

dborsatto added a commit that referenced this issue Aug 8, 2017
Refactored package to use PHPUnit 6 and namespaces (closes #20)
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 a pull request may close this issue.

3 participants