[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 20:45:54 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 jnylen0):
Tests should not affect the global state for other tests, so we reset the
registered meta keys after each test.
A better way to do this might be to save the registered meta keys in
`setUp` before each test runs, and then restore them in `tearDown`.
In the meantime you'll need to arrange for your meta keys to be registered
at the beginning of your tests, for example in the `setUp` method of any
relevant test classes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48300#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list