Explore running PHPUnit tests with WordPress Playground#2
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Test run errors: |
|
cc @JanJakes, you're probably aware of these from your sqlite-database-integration work but maybe there's still something surprising here. |
|
@JanJakes check out |
|
I fould out that tests like deprication checks fail due to PHPUnit being unable to override Playground's error handler. Disabling Playground's error handler, removed a few more issues from the list. |
|
@JanJakes check out this error related to using SAVEPOINT. |
|
There are also some errors related to using deprecated syntax in the SQLite plugin. |
|
@bgrgicak https://github.com/WordPress/sqlite-database-integration/ runs WP PHPUnit tests, and the known failures are listed here. We should cross-check the differences, but at first sight, it seems to me the list also contains some tests that are not listed here. I wonder why that is 🤔 |
Thanks, I haven't seen that list! The two errors I mentioned today aren't on the list. I will check what's happening there, they seem like SQLite issues, but could be WP-tester quirks. |
|
A quick try to compare them: Tests failing here: Tests failing in the SQLite CI: Overlap: That's strange. We need to figure out why the results differ so much. Is it possible that some tests are marked skipped on one side or the other, depending on which PHP extensions are available? There's also an idea for a small improvement—maybe we could add the test class name to the output so that it's more visible which exact test failed? |
Ahh, the class name is there above the whole section. I missed that when parsing out the test names. |
This PR explores running WordPress unit tests with Playground using WP Tester and PHPUnit.
The goal of this PR is to understand the limitations of Playground and WP Tester and it shouldn't be merged.
Testing instructions
composer installnpx @wp-tester/cli testNotes