function setUp() { parent::setUp(); /* Create and setup some comments for testing */ $post_id = $this->factory->post->create(); $this->factory->comment->create_post_comments($post_id, 10); $comments = get_comments(array('post_id' => $post_id)); $query = new WP_Query(); $query->comments = $comments; $GLOBALS['wp_query'] = $query; }
function setUp() { parent::setUp(); /* Create and setup a loop for testing */ $post_ids = $this->factory->post->create_many(10); foreach ($post_ids as $post_id) { clean_post_cache($post_id); } $query = new WP_Query(array('post_type' => 'post', 'posts_per_page' => 3)); $GLOBALS['wp_query'] = $query; }
function setUp() { /* Load the legacy files before anything else - needed for childtheme_overrides* to work */ include_legacy_xhtml_files(); /* Load the thematic files */ parent::setUp(); /* Create and setup some comments for testing */ $post_id = $this->factory->post->create(); $this->factory->comment->create_post_comments($post_id, 10); $comments = get_comments(array('post_id' => $post_id)); $query = new WP_Query(); $query->comments = $comments; $GLOBALS['wp_query'] = $query; }
function setUp() { /* Load the legacy files before anything else - needed for childtheme_overrides* to work */ include_legacy_xhtml_files(); /* Load the thematic files */ parent::setUp(); /* Create and setup a loop for testing */ $post_ids = $this->factory->post->create_many(10); foreach ($post_ids as $post_id) { clean_post_cache($post_id); } $query = new WP_Query(array('post_type' => 'post', 'posts_per_page' => 5)); $GLOBALS['wp_query'] = $query; thematic_replace_loops(); }
function tearDown() { remove_filter('thematic_default_theme_layout', array($this, 'switch_layout')); parent::tearDown(); }
function tearDown() { delete_option('thematic_theme_opt'); parent::tearDown(); }
function setUp() { $this->pre_upgrade_opt = array('index_insert' => 2, 'author_info' => 0, 'footer_txt' => 'Powered by [wp-link]. Built on the [theme-link].', 'del_legacy_opt' => 0); parent::setUp(); }