[wp-trac] [WordPress Trac] #55632: WordPress database error when running PHPUnit tests
WordPress Trac
noreply at wordpress.org
Fri Apr 29 00:08:53 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: Upgrade/Install | Version: trunk
Severity: normal | Resolution:
Keywords: needs-testing has-patch | Focuses:
-------------------------------------+---------------------
Changes (by peterwilsoncc):
* component: Build/Test Tools => Upgrade/Install
Comment:
I realised overnight the same error would occur during installation. As
it's a user facing component, I've moved the ticket to that.
Replying to [comment:7 SergeyBiryukov]:
> Just noting that this option also works in my testing.
Thanks for the logic check, I've updated the [https://github.com/WordPress
/wordpress-develop/pull/2638 linked pull request] to use
`wp_enqueue_scripts, 9`. Technically the priority isn't needed as the
actions run in order of registration but I figured I'd make it clear what
was happening.
> Is there a use case for registering webfonts earlier, like currently on
the `wp_loaded` hook?
Not that I am aware of for `theme.json`.
=== Testing notes ===
In all cases, you will need to check out the branch of the linked pull
request. This can be done by running `npm run grunt
patch:https://github.com/WordPress/wordpress-develop/pull/2638` in a
wordpress-develop environment.
==== Unit tests ====
1. Drop test database tables in test database
2. Run `phpunit`
3. Check for reported database table does not exist errors
==== WP CLI Installation ====
In your local environments root directory:
1. Run `wp db reset`
2. Run `wp core install --title=WP-DEV --admin_user=admin
--admin_password=password --admin_email=admin at example.com --url=wp-
dev.local` (replace the URL as appropriate)
3. Check for reported database table does not exist errors
==== Manual Installation ====
1. In your local environments root directory run `wp db reset`.
Alternatively drop all tables via a MySQL interface
2. Visit your local environment in the browser and follow the installation
steps
3. Check for reported database table does not exist errors
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55632#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list