Skip to content
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

Tools: Try adding infrastructure for PHPUnit tests #299

Merged
merged 20 commits into from
Nov 4, 2022
Merged

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Oct 31, 2022

I think it would be helpful to add unit tests for the global-font changes in #297, but we need the infrastructure in place first. This forks out the phpunit code from #204, and rebases it all to the current trunk.

To test:

  • yarn to install the wp-env dep
  • composer update to install the new composer deps
  • yarn test:php to run the tests (currently just the demo test)

The actions run on this PR should also include a unit-test action.

@ryelle ryelle requested a review from dd32 October 31, 2022 22:16
@ryelle ryelle self-assigned this Oct 31, 2022
"wp-coding-standards/wpcs": "2.*",
"wporg/wporg-repo-tools": "dev-trunk"
"wp-phpunit/wp-phpunit": "~6.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm pretty sure we don't need phpunit/phpunit or wp-phpunit/wp-phpunit since it's using the wp-env container & wp installation, but I've left it in from #204 in case it's necessary for running phpunit locally.

@ryelle ryelle requested a review from renintw October 31, 2022 22:18
Copy link
Contributor

@renintw renintw left a comment

Choose a reason for hiding this comment

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

Tested and looks good 👍

@ryelle ryelle merged commit fbe5b96 into trunk Nov 4, 2022
@ryelle ryelle deleted the try/phpunit-tests branch November 4, 2022 15:27
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