本文整理汇总了PHP中WP_UnitTestCase::ignore_files方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_UnitTestCase::ignore_files方法的具体用法?PHP WP_UnitTestCase::ignore_files怎么用?PHP WP_UnitTestCase::ignore_files使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WP_UnitTestCase
的用法示例。
在下文中一共展示了WP_UnitTestCase::ignore_files方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
function setUp()
{
set_time_limit(0);
if (!self::$ignore_files) {
self::$ignore_files = $this->scan_user_uploads();
}
if (!self::$hooks_saved) {
$this->_backup_hooks();
}
global $wpdb;
$wpdb->suppress_errors = false;
$wpdb->show_errors = true;
$wpdb->db_connect();
ini_set('display_errors', 1);
$this->factory = new WP_UnitTest_Factory();
$this->clean_up_global_scope();
/*
* When running core tests, ensure that post types and taxonomies
* are reset for each test. We skip this step for non-core tests,
* given the large number of plugins that register post types and
* taxonomies at 'init'.
*/
if (defined('WP_RUN_CORE_TESTS') && WP_RUN_CORE_TESTS) {
$this->reset_post_types();
$this->reset_taxonomies();
$this->reset_post_statuses();
}
$this->start_transaction();
$this->expectDeprecated();
add_filter('wp_die_handler', array($this, 'get_wp_die_handler'));
}
示例2: setUp
function setUp()
{
set_time_limit(0);
if (!self::$ignore_files) {
self::$ignore_files = $this->scan_user_uploads();
}
if (!self::$hooks_saved) {
$this->_backup_hooks();
}
global $wpdb;
$wpdb->suppress_errors = false;
$wpdb->show_errors = true;
$wpdb->db_connect();
ini_set('display_errors', 1);
$this->factory = new WP_UnitTest_Factory();
$this->clean_up_global_scope();
$this->start_transaction();
$this->expectDeprecated();
add_filter('wp_die_handler', array($this, 'get_wp_die_handler'));
}