-
-
Notifications
You must be signed in to change notification settings - Fork 117
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 compatibility with PHPUnit 9.3 #118
Conversation
Will conflict with #113. |
@GrahamCampbell I have reworked the PR hoping this will make the merge easier |
Could you please rebase this PR? |
I started working on PHP8 another ago. I see that that PR is using PHPUnit 9.3.10 with the symfony phpunit bridge. Have a look at #122. What are the pros/cons between that approach? |
@@ -1,11 +1,10 @@ | |||
<?php | |||
|
|||
namespace GuzzleHttp\Tests\Promise; | |||
namespace GuzzleHttp\Promise\Tests; |
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.
Good catch!
|
||
class TestCase extends PHPUnitTestCase | ||
{ | ||
public function setExpectedException($exception, $message = null, $code = null) |
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.
This is actually the job of Symfony PHPUnit bridge.
@@ -403,7 +397,7 @@ public function testCanCatchAndYieldOtherException() | |||
$promise->otherwise(function ($value) use (&$result) { $result = $value; }); | |||
P\Utils::queue()->run(); | |||
$this->assertTrue(P\Is::rejected($promise)); | |||
$this->assertContains('foo', $result->getMessage()); | |||
$this->assertTrue(strpos($result->getMessage(), 'foo') !== false, "'" . $result->getMessage() . " does not contain 'foo'"); |
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.
assertStringContainsString
When I have originally open this PR I wanted to keep it as minimal as possible. |
Yeah, I appreciate that. This morning when I started with this library I had no plans of creating PHP8 support. Thank you for you work. |
This is a required step to build the project with PHP8.