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


PHP WP_UnitTestCase类代码示例

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


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

示例1: setUp

 public function setUp()
 {
     global $post;
     parent::setUp();
     $post = $this->factory->post->create_and_get();
     $this->post = new WordPress_GitHub_Sync_Post($post->ID);
 }
开发者ID:kilbot,项目名称:wordpress-github-sync,代码行数:7,代码来源:test-helpers.php

示例2: tearDown

 function tearDown()
 {
     global $wp_rewrite;
     $wp_rewrite->init();
     update_option('home', $this->home_url);
     parent::tearDown();
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:7,代码来源:rewrite.php

示例3: setUp

 public function setUp()
 {
     if (!extension_loaded('openssl')) {
         $this->markTestSkipped('Tests_HTTP_Functions requires openssl.');
     }
     parent::setUp();
 }
开发者ID:rclilly,项目名称:wordpress-develop,代码行数:7,代码来源:functions.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $this->author_id = self::factory()->user->create(array('role' => 'editor'));
     // Override the post/archive slug collision prevention in `wp_unique_post_slug()`.
     add_filter('wp_unique_post_slug', array($this, 'filter_unique_post_slug'), 10, 6);
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:7,代码来源:numericSlugs.php

示例5: setUp

 function setUp()
 {
     parent::setUp();
     global $wp_rewrite;
     $wp_rewrite->set_permalink_structure('/%year%/%monthnum%/%day%/%postname%/');
     $wp_rewrite->flush_rules();
 }
开发者ID:boonebgorges,项目名称:wp,代码行数:7,代码来源:gallery.php

示例6: tearDown

 function tearDown()
 {
     foreach (array('curl', 'streams', 'fsockopen') as $t) {
         remove_filter("use_{$t}_transport", '__return_false');
     }
     parent::tearDown();
 }
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:7,代码来源:base.php

示例7: tearDown

 function tearDown()
 {
     remove_filter('extra_theme_headers', array($this, '_theme_data_extra_headers'));
     wp_clean_themes_cache();
     unset($GLOBALS['wp_themes']);
     parent::tearDown();
 }
开发者ID:Benrajalu,项目名称:philRaj,代码行数:7,代码来源:theme.php

示例8: setUp

 function setUp()
 {
     parent::setUp();
     global $rcp_levels_db;
     $args = array('name' => 'Gold', 'description' => 'The Gold Plan', 'duration' => '1', 'duration_unit' => 'month', 'price' => '10', 'fee' => '0', 'list_order' => '0', 'level' => '5', 'status' => 'active', 'role' => 'subscriber');
     $this->_level_id = $rcp_levels_db->insert($args);
 }
开发者ID:ramiy,项目名称:restrict-content-pro,代码行数:7,代码来源:test-levels.php

示例9: setUp

 function setUp()
 {
     parent::setUp();
     $this->month_url = get_month_link(date('Y'), date('m'));
     $this->year_url = get_year_link(date('Y'));
     $this->post_ids = $this->factory->post->create_many(8, array('post_type' => 'post', 'post_author' => '1'));
 }
开发者ID:boonebgorges,项目名称:wp,代码行数:7,代码来源:getArchives.php

示例10: setUp

 function setUp()
 {
     parent::setUp();
     $this->container = new Container();
     $this->container->object('pluginMeta', array())->packager('cliPackager', 'Arrow\\Twig\\CliPackager');
     $this->packager = $this->container->lookup('cliPackager');
 }
开发者ID:dsawardekar,项目名称:arrow,代码行数:7,代码来源:CliPackagerTest.php

示例11: tearDown

 function tearDown()
 {
     global $wpdb;
     update_site_option('ms_files_rewriting', 0);
     $wpdb->suppress_errors($this->suppress);
     parent::tearDown();
 }
开发者ID:Benrajalu,项目名称:philRaj,代码行数:7,代码来源:ms-files-rewriting.php

示例12: tearDown

 public function tearDown()
 {
     // Restoring global variables
     global $content_width;
     $content_width = $this->_globals['content_width'];
     parent::tearDown();
 }
开发者ID:dacker,项目名称:jetpack,代码行数:7,代码来源:test_class.jetpack_photon.php

示例13: tearDown

 /**
  * Finish the test suite for the CASServerPlugin class.
  */
 function tearDown()
 {
     parent::tearDown();
     unset($this->server);
     unset($this->redirect_location);
     remove_filter('wp_redirect', array($this, 'wp_redirect_handler'));
 }
开发者ID:goblindegook,项目名称:wp-cas-server,代码行数:10,代码来源:FiltersTest.php

示例14: setUp

 function setUp()
 {
     parent::setUp();
     set_current_screen('edit-page');
     $GLOBALS['hook_suffix'] = '';
     $this->table = _get_list_table('WP_Posts_List_Table');
 }
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:7,代码来源:includesListTable.php

示例15: setUp

 function setUp()
 {
     parent::setUp();
     $this->noop = new NOOP_Translations();
     $this->entry = new Translation_Entry(array('singular' => 'baba'));
     $this->plural_entry = new Translation_Entry(array('singular' => 'dyado', 'plural' => 'dyados', 'translations' => array('dyadox', 'dyadoy')));
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:7,代码来源:noopTranslations.php


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