Skip to content

Conversation

@swissspidy
Copy link
Member

Fixes compatibility with latest PHPUnit on PHP 8.1+ after wp-cli/wp-cli-tests#206

@swissspidy swissspidy added this to the 2.5.2 milestone May 22, 2024
@swissspidy swissspidy requested a review from a team as a code owner May 22, 2024 05:05
@swissspidy swissspidy enabled auto-merge May 22, 2024 05:16
Copy link
Member

@thelovekesh thelovekesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nitpicks. Rest LGTM!

Comment on lines +12 to +13
.phpunit.cache
.phpunit.result.cache
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.phpunit.cache
.phpunit.result.cache
*.[Cc]ache

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally prefer the more verbose format

beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutTodoAnnotatedTests="true"
colors="true"
verbose="true">
Copy link
Member

@thelovekesh thelovekesh May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to remove it from here, as PHPUnit doesn't support it in future releases. Verbosity can be handled from CLI instead if required?

beStrictAboutTodoAnnotatedTests="true"
colors="true"
verbose="true">
<testsuite name="wp-cli/package-command tests">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<testsuite name="wp-cli/package-command tests">
<testsuite name="default">

It can remain default given this test file is specific to this package. Also, I think we should add defaultTestSuite="default" attribute in the <phpunit> element?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more consistent with other commands though. Main thing is that the name is defined, which it previously wasn't.

@swissspidy swissspidy merged commit 3370dd8 into main May 22, 2024
@swissspidy swissspidy deleted the fix/unit-tests branch May 22, 2024 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants