-
Notifications
You must be signed in to change notification settings - Fork 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
Fix failing PHPUnit tests #188
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ composer.lock | |
phpunit.xml | ||
phpcs.xml | ||
.phpcs.xml | ||
.phpunit.cache | ||
.phpunit.result.cache | ||
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,11 +1,20 @@ | ||||||
<phpunit | ||||||
bootstrap="vendor/autoload.php" | ||||||
colors="true" | ||||||
> | ||||||
<testsuites> | ||||||
<testsuite> | ||||||
<directory prefix="spec-" suffix=".php">tests/</directory> | ||||||
<directory prefix="test-" suffix=".php">tests/</directory> | ||||||
</testsuite> | ||||||
</testsuites> | ||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd" | ||||||
bootstrap="vendor/autoload.php" | ||||||
backupGlobals="false" | ||||||
beStrictAboutCoversAnnotation="true" | ||||||
beStrictAboutOutputDuringTests="true" | ||||||
beStrictAboutTestsThatDoNotTestAnything="true" | ||||||
beStrictAboutTodoAnnotatedTests="true" | ||||||
colors="true" | ||||||
verbose="true"> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||||||
<testsuite name="wp-cli/package-command tests"> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
It can remain default given this test file is specific to this package. Also, I think we should add There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||||||
<directory suffix="Test.php">tests</directory> | ||||||
</testsuite> | ||||||
|
||||||
<filter> | ||||||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||||||
<directory suffix=".php">src</directory> | ||||||
</whitelist> | ||||||
</filter> | ||||||
</phpunit> |
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.
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.
I personally prefer the more verbose format