[wp-trac] [WordPress Trac] #48300: metadata registered using register_meta() do not persist through several tests
WordPress Trac
noreply at wordpress.org
Mon Oct 14 21:43:27 UTC 2019
#48300: metadata registered using register_meta() do not persist through several
tests
------------------------------+------------------------------
Reporter: leogermani | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: 5.1
Severity: normal | Resolution:
Keywords: | Focuses: rest-api
------------------------------+------------------------------
Comment (by peterwilsoncc):
The WP Test Suite's tear down functions returns the global state to a
before the `init` action fires. I'm not sure where it gets reset too from
memory though.
To refire the `init` hooks you can include `do_action( 'init' )` in your
set up functions. You can see an example of this in
`tests/phpunit/tests/customize/selective-refresh-ajax.php`'s
`do_customize_boot_actions()` method.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48300#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list