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

Editing Toolkit: Fix phpunit tests #47766

Closed
wants to merge 1 commit into from
Closed

Conversation

sirreal
Copy link
Member

@sirreal sirreal commented Nov 25, 2020

Changes proposed in this Pull Request

Testing instructions

Fixes #

@matticbot
Copy link
Contributor

@noahtallen
Copy link
Contributor

I'm not sure why this test is breaking -- this is one of the default config settings: https://github.com/WordPress/gutenberg/blob/3d5c413c541f16ff6a6a3cd6678ad140f7fdca5a/packages/env/lib/config/config.js#L82

@matticbot
Copy link
Contributor

Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com
Please ensure your changes work on WordPress.com before merging.

D53338-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing the Editing Toolkit Plugin for more info: PCYsg-ly5-p2

@sirreal
Copy link
Member Author

sirreal commented Nov 25, 2020

Over in #47498 this error is reported:

Error: The required WP_TESTS_EMAIL constant is not defined. Check out `wp-tests-config-sample.php` for an example.

https://github.com/Automattic/wp-calypso/pull/47498/checks?check_run_id=1450609800

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@sirreal
Copy link
Member Author

sirreal commented Nov 25, 2020

I can't reproduce the failures locally 🤷

@noahtallen
Copy link
Contributor

wft

I'll try to toubleshoot as well. I have one hunch about wp-phpunit (the composer dep pulling in the wordpress tests lib), but if it's working locally...

@noahtallen
Copy link
Contributor

noahtallen commented Nov 26, 2020

So the tests lib is reporting a problem in this file: https://github.com/wp-phpunit/wp-phpunit/blob/master/includes/bootstrap.php on line 100. Firstly, line 100 does not reference that constant. Secondly, the file hasn't been updated since August, so it's unlikely to have changed in composer. Thirdly, early in the file, it checks that the required constants are defined. So it should be throwing an error there if the constants are not set.

So, I think it's possible that the dependency is out of date, or something else is off with composer. I took a shot at this here: #47772

If that's the case, this reminds me of a wp-env issue I've been meaning to fix: WordPress/gutenberg#23171

@sirreal sirreal added [Type] Bug When a feature is broken and / or not performing as intended Editing Toolkit For issues and PRs that affect the Editing Toolkit plugin labels Nov 27, 2020
@noahtallen
Copy link
Contributor

Closing in favor of #47979

@noahtallen noahtallen closed this Dec 2, 2020
@sirreal sirreal deleted the fix/etk-phpunit-fails branch December 4, 2020 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editing Toolkit For issues and PRs that affect the Editing Toolkit plugin [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants