
Do this in wp_core_load_component() and let the component loaders worry only about creating the object. Also run the main loop in tests while loading components, to ensure that the async operation finishes before continuing execution. GTask makes sure to make the operation async always, by emitting the callback from an idle GSource.