Changeset 50450
- Timestamp:
- 02/27/2021 05:08:26 PM (4 years ago)
- Location:
- trunk/tests/phpunit
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase-ajax.php
r50449 r50450 158 158 */ 159 159 public function tearDown() { 160 parent::tearDown();161 160 $_POST = array(); 162 161 $_GET = array(); … … 167 166 error_reporting( $this->_error_level ); 168 167 set_current_screen( 'front' ); 168 parent::tearDown(); 169 169 } 170 170 -
trunk/tests/phpunit/includes/testcase-block-supports.php
r50449 r50450 20 20 */ 21 21 public function tearDown() { 22 parent::tearDown();23 24 22 while ( ! empty( $this->registered_block_names ) ) { 25 23 $block_name = array_pop( $this->registered_block_names ); 26 24 unregister_block_type( $block_name ); 27 25 } 26 27 parent::tearDown(); 28 28 } 29 29 -
trunk/tests/phpunit/includes/testcase-rest-controller.php
r46586 r50450 15 15 16 16 public function tearDown() { 17 parent::tearDown();18 17 remove_filter( 'rest_url', array( $this, 'test_rest_url_for_leading_slash' ), 10, 2 ); 19 18 /** @var WP_REST_Server $wp_rest_server */ 20 19 global $wp_rest_server; 21 20 $wp_rest_server = null; 21 parent::tearDown(); 22 22 } 23 23 -
trunk/tests/phpunit/tests/ajax/CustomizeManager.php
r49603 r50450 60 60 */ 61 61 public function tearDown() { 62 $_REQUEST = array(); 62 63 parent::tearDown(); 63 $_REQUEST = array();64 64 } 65 65 -
trunk/tests/phpunit/tests/auth.php
r50284 r50450 44 44 45 45 public function tearDown() { 46 parent::tearDown();47 48 46 // Cleanup all the global state. 49 47 unset( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'], $GLOBALS['wp_rest_application_password_status'], $GLOBALS['wp_rest_application_password_uuid'] ); 48 49 parent::tearDown(); 50 50 } 51 51 -
trunk/tests/phpunit/tests/blocks/block-context.php
r48937 r50450 45 45 */ 46 46 public function tearDown() { 47 parent::tearDown();48 49 47 while ( ! empty( $this->registered_block_names ) ) { 50 48 $block_name = array_pop( $this->registered_block_names ); 51 49 unregister_block_type( $block_name ); 52 50 } 51 52 parent::tearDown(); 53 53 } 54 54 -
trunk/tests/phpunit/tests/blocks/block-list.php
r48937 r50450 38 38 */ 39 39 public function tearDown() { 40 $this->registry = null; 41 40 42 parent::tearDown(); 41 42 $this->registry = null;43 43 } 44 44 -
trunk/tests/phpunit/tests/blocks/block-type-registry.php
r48939 r50450 42 42 */ 43 43 public function tearDown() { 44 $this->registry = null; 45 44 46 parent::tearDown(); 45 46 $this->registry = null;47 47 } 48 48 -
trunk/tests/phpunit/tests/blocks/block.php
r50123 r50450 37 37 */ 38 38 public function tearDown() { 39 $this->registry = null; 40 39 41 parent::tearDown(); 40 41 $this->registry = null;42 42 } 43 43 -
trunk/tests/phpunit/tests/blocks/register.php
r49982 r50450 59 59 */ 60 60 function tearDown() { 61 parent::tearDown();62 63 61 $registry = WP_Block_Type_Registry::get_instance(); 64 62 … … 68 66 } 69 67 } 68 69 parent::tearDown(); 70 70 } 71 71 -
trunk/tests/phpunit/tests/blocks/render.php
r48937 r50450 39 39 */ 40 40 public function tearDown() { 41 parent::tearDown();42 43 41 $this->test_block_instance_number = 0; 44 42 … … 50 48 $registry->unregister( 'core/dynamic' ); 51 49 } 50 51 parent::tearDown(); 52 52 } 53 53 -
trunk/tests/phpunit/tests/customize/custom-css-setting.php
r48939 r50450 56 56 */ 57 57 function tearDown() { 58 $this->setting = null; 58 59 parent::tearDown(); 59 $this->setting = null;60 60 } 61 61 -
trunk/tests/phpunit/tests/dbdelta.php
r50449 r50450 94 94 parent::tearDown(); 95 95 96 // This has to be called after the parent `tearDown()` method. 96 97 $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}dbdelta_test" ); 97 98 } -
trunk/tests/phpunit/tests/formatting/ExcerptRemoveBlocks.php
r48937 r50450 82 82 */ 83 83 function tearDown() { 84 parent::tearDown();85 84 $registry = WP_Block_Type_Registry::get_instance(); 86 85 $registry->unregister( 'core/fake' ); 87 86 wp_delete_post( self::$post_id, true ); 87 88 parent::tearDown(); 88 89 } 89 90 -
trunk/tests/phpunit/tests/functions/deprecated.php
r49024 r50450 54 54 * Tears down the test fixture. 55 55 */ 56 public function tear down() {56 public function tearDown() { 57 57 remove_action( 'deprecated_function_run', array( $this, 'deprecated_function' ), 10, 3 ); 58 58 remove_action( 'deprecated_function_trigger_error', '__return_false' ); -
trunk/tests/phpunit/tests/functions/referer.php
r49006 r50450 19 19 20 20 public function tearDown() { 21 parent::tearDown();22 23 21 $_SERVER['HTTP_REFERER'] = ''; 24 22 $_SERVER['REQUEST_URI'] = ''; 25 23 $_REQUEST['_wp_http_referer'] = ''; 24 25 parent::tearDown(); 26 26 } 27 27 -
trunk/tests/phpunit/tests/menu/wpAjaxMenuQuickSearch.php
r50449 r50450 28 28 function tearDown() { 29 29 global $current_screen; 30 $current_screen = $this->current_screen; 30 31 parent::tearDown(); 31 $current_screen = $this->current_screen;32 32 } 33 33 -
trunk/tests/phpunit/tests/multisite.php
r48937 r50450 19 19 function tearDown() { 20 20 global $wpdb; 21 $wpdb->suppress_errors( $this->suppress ); 21 22 parent::tearDown(); 22 $wpdb->suppress_errors( $this->suppress );23 23 } 24 24 -
trunk/tests/phpunit/tests/oembed/controller.php
r50441 r50450 61 61 62 62 public function tearDown() { 63 parent::tearDown();64 63 /** @var WP_REST_Server $wp_rest_server */ 65 64 global $wp_rest_server; … … 68 67 remove_filter( 'pre_http_request', array( $this, 'mock_embed_request' ), 10 ); 69 68 remove_filter( 'oembed_result', array( $this, 'filter_oembed_result' ), 10 ); 69 parent::tearDown(); 70 70 } 71 71 -
trunk/tests/phpunit/tests/query/commentCount.php
r49603 r50450 15 15 16 16 public function tearDown() { 17 unset( $this->q ); 17 18 parent::tearDown(); 18 unset( $this->q );19 19 } 20 20 -
trunk/tests/phpunit/tests/rest-api/rest-application-passwords-controller.php
r50284 r50450 71 71 72 72 public function tearDown() { 73 unset( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'], $GLOBALS['wp_rest_application_password_status'], $GLOBALS['wp_rest_application_password_uuid'] ); 73 74 parent::tearDown(); 74 unset( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'], $GLOBALS['wp_rest_application_password_status'], $GLOBALS['wp_rest_application_password_uuid'] );75 75 } 76 76 -
trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php
r50150 r50450 89 89 90 90 public function tearDown() { 91 parent::tearDown();92 93 91 if ( file_exists( $this->test_file ) ) { 94 92 unlink( $this->test_file ); … … 108 106 WP_Image_Editor_Mock::$size_return = null; 109 107 } 108 109 parent::tearDown(); 110 110 } 111 111 -
trunk/tests/phpunit/tests/rest-api/rest-controller.php
r50007 r50450 54 54 55 55 public function tearDown() { 56 parent::tearDown();57 58 56 global $wp_rest_additional_fields; 59 57 $wp_rest_additional_fields = array(); 58 59 parent::tearDown(); 60 60 } 61 61 -
trunk/tests/phpunit/tests/rest-api/rest-plugins-controller.php
r49951 r50450 84 84 85 85 public function tearDown() { 86 parent::tearDown();87 88 86 if ( file_exists( WP_PLUGIN_DIR . '/test-plugin/test-plugin.php' ) ) { 89 87 $this->rmdir( WP_PLUGIN_DIR . '/test-plugin' ); 90 88 } 89 90 parent::tearDown(); 91 91 } 92 92 -
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r50072 r50450 28 28 29 29 public function tearDown() { 30 parent::tearDown();31 32 30 /** @var WP_REST_Server $wp_rest_server */ 33 31 global $wp_rest_server; … … 35 33 36 34 remove_filter( 'pre_http_request', array( $this, 'mock_embed_request' ), 10, 3 ); 35 parent::tearDown(); 37 36 } 38 37 -
trunk/tests/phpunit/tests/rest-api/rest-settings-controller.php
r49603 r50450 40 40 41 41 public function tearDown() { 42 parent::tearDown();43 44 42 $settings_to_unregister = array( 45 43 'mycustomsetting', … … 56 54 } 57 55 } 56 57 parent::tearDown(); 58 58 } 59 59 -
trunk/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php
r49603 r50450 233 233 } 234 234 235 public function tearDown() {236 parent::tearDown();237 }238 239 235 /** 240 236 * Utility function for use in get_public_taxonomies -
trunk/tests/phpunit/tests/rewrite/oldDateRedirect.php
r49603 r50450 43 43 44 44 public function tearDown() { 45 $this->old_date_redirect_url = null; 46 45 47 parent::tearDown(); 46 47 $this->old_date_redirect_url = null;48 48 } 49 49 -
trunk/tests/phpunit/tests/rewrite/oldSlugRedirect.php
r48937 r50450 31 31 32 32 public function tearDown() { 33 parent::tearDown();34 35 33 $this->old_slug_redirect_url = null; 36 34 37 35 remove_filter( 'old_slug_redirect_url', array( $this, 'filter_old_slug_redirect_url' ), 10 ); 36 parent::tearDown(); 38 37 } 39 38
Note: See TracChangeset
for help on using the changeset viewer.