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(); }