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


PHP WP_UnitTestCase::setUpBeforeClass方法代码示例

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


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

示例1: setUpBeforeClass

    public static function setUpBeforeClass()
    {
        parent::setUpBeforeClass();
        self::$bacon_comment = 'Bacon ipsum dolor amet porchetta capicola sirloin prosciutto brisket shankle jerky. Ham hock filet mignon boudin ground round, prosciutto alcatra spare ribs meatball turducken pork beef ribs ham beef. Bacon pastrami short loin, venison tri-tip ham short ribs doner swine. Tenderloin pig tongue pork jowl doner. Pork loin rump t-bone, beef strip steak flank drumstick tri-tip short loin capicola jowl. Cow filet mignon hamburger doner rump. Short loin jowl drumstick, tongue tail beef ribs pancetta flank brisket landjaeger chuck venison frankfurter turkey.

Brisket shank rump, tongue beef ribs swine fatback turducken capicola meatball picanha chicken cupim meatloaf turkey. Bacon biltong shoulder tail frankfurter boudin cupim turkey drumstick. Porchetta pig shoulder, jerky flank pork tail meatball hamburger. Doner ham hock ribeye tail jerky swine. Leberkas ribeye pancetta, tenderloin capicola doner turducken chicken venison ground round boudin pork chop. Tail pork loin pig spare ribs, biltong ribeye brisket pork chop cupim. Short loin leberkas spare ribs jowl landjaeger tongue kevin flank bacon prosciutto.

Shankle pork chop prosciutto ribeye ham hock pastrami. T-bone shank brisket bacon pork chop. Cupim hamburger pork loin short loin. Boudin ball tip cupim ground round ham shoulder. Sausage rump cow tongue bresaola pork pancetta biltong tail chicken turkey hamburger. Kevin flank pork loin salami biltong. Alcatra landjaeger pastrami andouille kielbasa ham tenderloin drumstick sausage turducken tongue corned beef.';
    }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:9,代码来源:getCommentExcerpt.php

示例2: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     Tests_Two_Factor_Email::$mockmailer = new MockPHPMailer();
     if (isset($GLOBALS['phpmailer'])) {
         Tests_Two_Factor_Email::$phpmailer = $GLOBALS['phpmailer'];
         $GLOBALS['phpmailer'] = Tests_Two_Factor_Email::$mockmailer;
     }
     $_SERVER['SERVER_NAME'] = 'example.com';
 }
开发者ID:j-falk,项目名称:two-factor,代码行数:10,代码来源:class.two-factor-email.php

示例3: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     define('DOING_AJAX', true);
     // Defined so that 'exit' is not called in process_submission
     // Remove any relevant filters that might exist before running the tests
     remove_all_filters('grunion_still_email_spam');
     remove_all_filters('jetpack_contact_form_is_spam');
     remove_all_filters('wp_mail');
 }
开发者ID:Nihilivin,项目名称:jetpack,代码行数:10,代码来源:test_class.grunion-contact-form.php

示例4: setUpBeforeClass

 /**
  * Taken from testcase-ajax.php setUpBeforeClass function
  */
 public static function setUpBeforeClass()
 {
     if (!defined('DOING_AJAX')) {
         define('DOING_AJAX', true);
     }
     remove_action('admin_init', '_maybe_update_core');
     remove_action('admin_init', '_maybe_update_plugins');
     remove_action('admin_init', '_maybe_update_themes');
     add_action('wp_ajax_heartbeat', 'wp_ajax_heartbeat', 1);
     add_action('wp_ajax_heartbeat', 'wp_ajax_nopriv_heartbeat', 1);
     parent::setUpBeforeClass();
 }
开发者ID:philoserf,项目名称:Edit-Flow,代码行数:15,代码来源:testcase-edit-flow-ajax.php

示例5: setUpBeforeClass

 /**
  * Setup test prerequisites once
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     // throw in a test itag, so we can cleanup later
     PmpSyncer::$ITAGS = array_unique(array_merge(PmpSyncer::$ITAGS, array(self::$_write_itag)));
     // must have pmp settings defined
     $settings = get_option('pmp_settings');
     if (empty($settings['pmp_api_url']) || empty($settings['pmp_client_id']) || empty($settings['pmp_client_secret'])) {
         self::$_sdk_wrapper = false;
     } else {
         self::$_sdk_wrapper = new SDKWrapper();
         self::$_pmp_story = self::$_sdk_wrapper->fetchDoc(self::$_pmp_story_guid);
     }
 }
开发者ID:jackbrighton,项目名称:pmp-wordpress,代码行数:17,代码来源:PMPSyncerTestCase.php

示例6: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     if (!defined('DOING_AJAX')) {
         define('DOING_AJAX', true);
     }
     remove_action('admin_init', '_maybe_update_core');
     remove_action('admin_init', '_maybe_update_plugins');
     remove_action('admin_init', '_maybe_update_themes');
     // Register the core actions
     foreach (array_merge(self::$_core_actions_get, self::$_core_actions_post) as $action) {
         if (function_exists('wp_ajax_' . str_replace('-', '_', $action))) {
             add_action('wp_ajax_' . $action, 'wp_ajax_' . str_replace('-', '_', $action), 1);
         }
     }
     parent::setUpBeforeClass();
 }
开发者ID:pbearne,项目名称:contrib2core,代码行数:16,代码来源:testcase-ajax.php

示例7: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     require_once ABSPATH . WPINC . '/class-wp-admin-bar.php';
     parent::setUpBeforeClass();
 }
开发者ID:aaemnnosttv,项目名称:develop.git.wordpress.org,代码行数:5,代码来源:adminbar.php

示例8: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     self::$original_site_blog_upload_space = get_site_option('blog_upload_space');
     self::$original_blog_upload_space = get_option('blog_upload_space');
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:6,代码来源:isUploadSpaceAvailable.php

示例9: setUpBeforeClass

 static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     include_once ABSPATH . '/wp-admin/includes/plugin.php';
 }
开发者ID:EmreKarahan,项目名称:wordpress,代码行数:5,代码来源:Carbon_Container_ThemeOptionsTest.php

示例10: setUpBeforeClass

 static function setUpBeforeClass()
 {
     WP_UnitTestCase::setUpBeforeClass();
     require_once ABSPATH . WPINC . '/class-wp-admin-bar.php';
 }
开发者ID:boonebgorges,项目名称:wp,代码行数:5,代码来源:adminbar.php

示例11: setUpBeforeClass

 /**
  * Make sure the upgrade code is loaded before the tests are run.
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     require_once ABSPATH . 'wp-admin/includes/upgrade.php';
 }
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:8,代码来源:dbdelta.php

示例12: setup_once

 /**
  * Runs before the first test
  * @beforeClass
  */
 static function setup_once()
 {
     WP_UnitTestCase::setUpBeforeClass();
     require_once 'shared-setup.php';
 }
开发者ID:jsandlin85,项目名称:SkylineSports,代码行数:9,代码来源:test-general.php

示例13: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     set_error_handler(array('Test_ClassTwoFactorCore', 'error_handler'));
 }
开发者ID:j-falk,项目名称:two-factor,代码行数:5,代码来源:class.two-factor-core.php


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