[wp-trac] [WordPress Trac] #54724: PHPunit tests should not load remote patterns
WordPress Trac
noreply at wordpress.org
Mon Jan 3 19:32:05 UTC 2022
#54724: PHPunit tests should not load remote patterns
------------------------------+------------------------------
Reporter: Chouby | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+------------------------------
Comment (by Chouby):
I already had included
{{{
remove_action( 'current_screen', '_load_remote_block_patterns' );
remove_action( 'current_screen', '_load_remote_featured_patterns' );
}}}
to my test case. But I confirm that
{{{
add_filter( 'should_load_remote_block_patterns', '__return_false' );
}}}
is as efficient.
My proposal is to add this to the WordPress test framework as it should
make sure that remote requests usually initiated by WordPress are never
fired during PHPUnit tests.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54724#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list