[wp-trac] [WordPress Trac] #47195: Switch WP_UnitTest_Factory_For_Blog->create_object() to use wp_insert_site()
WordPress Trac
noreply at wordpress.org
Thu May 9 12:13:54 UTC 2019
#47195: Switch WP_UnitTest_Factory_For_Blog->create_object() to use
wp_insert_site()
------------------------------+---------------------
Reporter: danielbachhuber | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.3
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
------------------------------+---------------------
Comment (by danielbachhuber):
Replying to [comment:1 jeremyfelt]:
> One note: `wpmu_create_blog()` itself should not produce a deprecated
notice. We left that off for the near term because of how widely used it
is. The `wpmu_new_blog` hook from that function was moved over to
`wp_insert_site()` and that does have a notice attached to it. There's a
chance that this would still cause test issues after moving the factory to
`wp_insert_site()`.
Yep. My test still failed after I changed it over to `wp_insert_site()`,
which made me realize I had some code hooked on to `wpmu_new_blog` too. It
was the hook that was causing the deprecation notice.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47195#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list