Skip to content

Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase#1953

Merged
sagikazarmark merged 2 commits intoguzzle:masterfrom
carusogabriel:phpunit
Feb 5, 2018
Merged

Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase#1953
sagikazarmark merged 2 commits intoguzzle:masterfrom
carusogabriel:phpunit

Conversation

@carusogabriel
Copy link
Copy Markdown
Contributor

I use the PHPUnit\Framework\TestCase notation instead of PHPUnit_Framework_TestCase while extending our TestCases. This will help us migrate to PHPUnit 6, that no longer support snake case class names.

I just need to bump PHPUnit version to ^4.8.35 and ^5.7, that support this namespace.

@sagikazarmark
Copy link
Copy Markdown
Member

Thanks a lot for your PR. I believe ^4.8.35 || ^5.7 || ^6.0 should be OK as well.

Can you check why the tests are broken?

@carusogabriel
Copy link
Copy Markdown
Contributor Author

@sagikazarmark I'll work on that

@carusogabriel
Copy link
Copy Markdown
Contributor Author

carusogabriel commented Nov 11, 2017

@sagikazarmark Tests fixed, and now we support PHPUnit 6 🏁

I just need to set backupGlobals="true" in our XML config file, to preserve some Session tests.

Any doubt, I used this article from @sebastianbergmann to help me in this update.

@TomasVotruba
Copy link
Copy Markdown

Just fyi, there is no reason to support 4.0 version, this is dev dependency. Thus not installed anywhere but in this project.

@sagikazarmark
Copy link
Copy Markdown
Member

@carusogabriel many thanks for your work!

@TomasVotruba we still officially support PHP 5.5 and as of PHPUnit 5.0 the minimum PHP requirement is 5.6. So we still need PHPUnit 4.x for a while...but hopefully, not so long.

@sagikazarmark sagikazarmark merged commit 8b8df00 into guzzle:master Feb 5, 2018
@carusogabriel carusogabriel deleted the phpunit branch February 5, 2018 07:30
@TomasVotruba
Copy link
Copy Markdown

👍

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.

3 participants