[wp-trac] [WordPress Trac] #58673: WordPress database error when installing PHPUnit tests
WordPress Trac
noreply at wordpress.org
Tue Jul 11 13:29:43 UTC 2023
#58673: WordPress database error when installing PHPUnit tests
--------------------------+---------------------
Reporter: Chouby | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.3
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+---------------------
Changes (by swissspidy):
* keywords: => needs-patch
Comment:
This is still happening for me on trunk.
It happens the first time when installing & running the PHPUnit tests from
a plugin.
After that, all the database tables exist, so on the second run it's not
failing.
From what I can see:
1. `phpunit/includes/bootstrap.php` calls `phpunit/includes/install.php`
to install WordPress
2. `phpunit/includes/install.php` loads `wp-settings.php`
3. `wp-settings.php` fires `wp_loaded`
4. `WP_Duotone::set_global_style_block_names()` is hooked to `wp_loaded`
and triggers a `WP_Query`
5. Now you have the database error
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58673#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list