当前位置: 首页>>代码示例>>PHP>>正文


PHP WP_UnitTestCase::clean_up_global_scope方法代码示例

本文整理汇总了PHP中WP_UnitTestCase::clean_up_global_scope方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_UnitTestCase::clean_up_global_scope方法的具体用法?PHP WP_UnitTestCase::clean_up_global_scope怎么用?PHP WP_UnitTestCase::clean_up_global_scope使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WP_UnitTestCase的用法示例。


在下文中一共展示了WP_UnitTestCase::clean_up_global_scope方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unset

 /**
  * Clean up global scope.
  */
 function clean_up_global_scope()
 {
     global $customize_snapshots_plugin;
     unset($_REQUEST['customize_snapshot_uuid']);
     parent::clean_up_global_scope();
     $customize_snapshots_plugin = new Plugin();
     $customize_snapshots_plugin->init();
 }
开发者ID:xwp,项目名称:wp-customize-snapshots,代码行数:11,代码来源:test-customize-snapshots.php

示例2: array

 function clean_up_global_scope()
 {
     global $wp_widget_factory, $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates;
     $wp_registered_sidebars = array();
     $wp_registered_widgets = array();
     $wp_registered_widget_controls = array();
     $wp_registered_widget_updates = array();
     $wp_widget_factory->widgets = array();
     parent::clean_up_global_scope();
 }
开发者ID:Benrajalu,项目名称:philRaj,代码行数:10,代码来源:widgets.php

示例3: array

 function clean_up_global_scope()
 {
     global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates, $wp_post_types, $wp_customize;
     // @codingStandardsIgnoreStart
     $wp_registered_sidebars = $wp_registered_widgets = $wp_registered_widget_controls = $wp_registered_widget_updates = array();
     // @codingStandardsIgnoreEnd
     $this->plugin->widget_factory->widgets = array();
     unset($wp_post_types[Widget_Posts::INSTANCE_POST_TYPE]);
     $wp_customize = null;
     parent::clean_up_global_scope();
 }
开发者ID:BE-Webdesign,项目名称:wp-customize-widgets-plus,代码行数:11,代码来源:class-base-test-case.php

示例4: buddypress

 function clean_up_global_scope()
 {
     buddypress()->bp_nav = buddypress()->bp_options_nav = buddypress()->action_variables = buddypress()->canonical_stack = buddypress()->unfiltered_uri = $GLOBALS['bp_unfiltered_uri'] = array();
     buddypress()->current_component = buddypress()->current_item = buddypress()->current_action = buddypress()->current_member_type = '';
     buddypress()->unfiltered_uri_offset = 0;
     buddypress()->is_single_item = false;
     buddypress()->current_user = new stdClass();
     buddypress()->displayed_user = new stdClass();
     buddypress()->loggedin_user = new stdClass();
     buddypress()->pages = array();
     parent::clean_up_global_scope();
 }
开发者ID:jasonmcalpin,项目名称:BuddyPress,代码行数:12,代码来源:testcase.php

示例5: array

 function clean_up_global_scope()
 {
     parent::clean_up_global_scope();
     $locales =& GP_Locales::instance();
     $locales->locales = array();
     $_GET = array();
     $_POST = array();
     /**
      * @todo re-initialize all thing objects
      */
     GP::$translation_set = new GP_Translation_Set();
     GP::$original = new GP_Original();
 }
开发者ID:akirk,项目名称:GlotPress,代码行数:13,代码来源:testcase.php

示例6:

 /**
  *  Use this to clean up any global scope singletons etc that we may have being used by EE so
  *  that they are fresh between tests.
  *
  * @todo this of course means we need an easy way to reset our singletons...
  * @see parent::cleanup_global_scope();
  */
 function clean_up_global_scope()
 {
     parent::clean_up_global_scope();
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:11,代码来源:EE_UnitTestCase.class.php

示例7:

 /**
  * Delete the $wp_customize global when cleaning up scope.
  */
 function clean_up_global_scope()
 {
     global $wp_customize;
     $wp_customize = null;
     parent::clean_up_global_scope();
 }
开发者ID:kucrut,项目名称:wordpress,代码行数:9,代码来源:nav-menus.php

示例8: unset

 /**
  * Clean up global scope.
  */
 function clean_up_global_scope()
 {
     unset($GLOBALS['wp_scripts']);
     unset($GLOBALS['wp_styles']);
     unset($_REQUEST['customize_snapshot_uuid']);
     unset($_REQUEST['wp_customize_preview_ajax']);
     parent::clean_up_global_scope();
 }
开发者ID:xwp,项目名称:wp-customize-snapshots,代码行数:11,代码来源:test-class-customize-snapshot-manager.php

示例9: unset

 function clean_up_global_scope()
 {
     parent::clean_up_global_scope();
     if (isset($GLOBALS['current_screen'])) {
         unset($GLOBALS['current_screen']);
     }
     global $frm_vars;
     $frm_vars = array('load_css' => false, 'forms_loaded' => array(), 'created_entries' => array(), 'pro_is_authorized' => false, 'next_page' => array(), 'prev_page' => array());
     if (class_exists('FrmUpdatesController')) {
         global $frm_update;
         $frm_update = new FrmUpdatesController();
     }
     if (class_exists('FrmProEddController')) {
         $frmedd_update = new FrmProEddController();
         $frm_vars['pro_is_authorized'] = $frmedd_update->pro_is_authorized();
     }
 }
开发者ID:knightzac19,项目名称:formidable-forms,代码行数:17,代码来源:FrmUnitTest.php


注:本文中的WP_UnitTestCase::clean_up_global_scope方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。