[wp-trac] [WordPress Trac] #55632: WordPress database error when running PHPUnit tests
WordPress Trac
noreply at wordpress.org
Thu Apr 28 05:35:49 UTC 2022
#55632: WordPress database error when running PHPUnit tests
-------------------------------------+---------------------
Reporter: Chouby | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.0
Component: Build/Test Tools | Version: trunk
Severity: normal | Resolution:
Keywords: needs-testing has-patch | Focuses:
-------------------------------------+---------------------
Changes (by peterwilsoncc):
* keywords: needs-patch needs-testing => needs-testing has-patch
Comment:
I was able to reproduce this locally.
1. Open test database in your favourite MySQL interface
2. Drop all of the tables
3. Run `phpunit` and observe the error described above.
[attachment:"55632.diff"] fixes the problem by assuming there are no
webfonts to enqueue during installation and bypassing the check of
`WP_Theme_JSON_Resolver`. An alternative might be to move
`$fn_register_webfonts` to run early on the `wp_enqueue_scripts` hook.
The fuller solution is probably at a lower level in which FSE themes check
whether WP is installed before attempting to access the FSE posts.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55632#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list