本文整理汇总了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.';
}
示例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';
}
示例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');
}
示例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();
}
示例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);
}
}
示例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();
}
示例7: setUpBeforeClass
public static function setUpBeforeClass()
{
require_once ABSPATH . WPINC . '/class-wp-admin-bar.php';
parent::setUpBeforeClass();
}
示例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');
}
示例9: setUpBeforeClass
static function setUpBeforeClass()
{
parent::setUpBeforeClass();
include_once ABSPATH . '/wp-admin/includes/plugin.php';
}
示例10: setUpBeforeClass
static function setUpBeforeClass()
{
WP_UnitTestCase::setUpBeforeClass();
require_once ABSPATH . WPINC . '/class-wp-admin-bar.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';
}
示例12: setup_once
/**
* Runs before the first test
* @beforeClass
*/
static function setup_once()
{
WP_UnitTestCase::setUpBeforeClass();
require_once 'shared-setup.php';
}
示例13: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
set_error_handler(array('Test_ClassTwoFactorCore', 'error_handler'));
}