mirror of
git://develop.git.wordpress.org/
synced 2025-03-24 22:10:02 +01:00
Build/Test Tools: Update external-http
group to include all network tests.
Updates the `external-http` group in the PHPUnit test suite to include all tests that rely on network requests. This is to ensure the main test suite runs do not contain any tests that can fail due to network conditions. Props sukhendu2002, azaozz, audrasjb. Fixes #62325. git-svn-id: https://develop.svn.wordpress.org/trunk@59964 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
76d98ad407
commit
07e3b258b5
@ -26,6 +26,8 @@ class Tests_HTTP_wpGetHttpHeaders extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* Test with an invalid URL
|
||||
*
|
||||
* @group external-http
|
||||
*/
|
||||
public function test_wp_get_http_headers_invalid_url() {
|
||||
$result = wp_get_http_headers( 'not_an_url' );
|
||||
@ -34,6 +36,8 @@ class Tests_HTTP_wpGetHttpHeaders extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* Test to see if the deprecated argument is working
|
||||
*
|
||||
* @group external-http
|
||||
*/
|
||||
public function test_wp_get_http_headers_deprecated_argument() {
|
||||
$this->setExpectedDeprecated( 'wp_get_http_headers' );
|
||||
|
@ -45,6 +45,9 @@ if ( is_multisite() ) :
|
||||
$this->assertSame( 1, $test_action_counter->get_call_count() );
|
||||
}
|
||||
|
||||
/**
|
||||
* @group external-http
|
||||
*/
|
||||
public function test_content_from_spam_blog_is_not_available() {
|
||||
$spam_blog_id = self::factory()->blog->create();
|
||||
switch_to_blog( $spam_blog_id );
|
||||
|
@ -92,6 +92,9 @@ class WP_Test_REST_Site_Health_Controller extends WP_Test_REST_TestCase {
|
||||
$this->assertErrorResponse( 'rest_forbidden', $response, 403 );
|
||||
}
|
||||
|
||||
/**
|
||||
* @group external-http
|
||||
*/
|
||||
public function test() {
|
||||
wp_set_current_user( self::$admin );
|
||||
$response = rest_do_request( '/wp-site-health/v1/tests/dotorg-communication' );
|
||||
|
@ -123,6 +123,9 @@ class Tests_REST_WpRestBlockPatternsController extends WP_Test_REST_Controller_T
|
||||
$this->assertArrayHasKey( static::REQUEST_ROUTE, $routes );
|
||||
}
|
||||
|
||||
/**
|
||||
* @group external-http
|
||||
*/
|
||||
public function test_get_items() {
|
||||
wp_set_current_user( self::$admin_id );
|
||||
|
||||
@ -189,6 +192,7 @@ class Tests_REST_WpRestBlockPatternsController extends WP_Test_REST_Controller_T
|
||||
* @since 6.2.0
|
||||
*
|
||||
* @ticket 57532
|
||||
* @group external-http
|
||||
*
|
||||
* @covers WP_REST_Block_Patterns_Controller::get_items
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user