コード例 #1
0
ファイル: test-comments.php プロジェクト: scottnix/Thematic
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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();
 }
コード例 #5
0
 function tearDown()
 {
     remove_filter('thematic_default_theme_layout', array($this, 'switch_layout'));
     parent::tearDown();
 }
コード例 #6
0
 function tearDown()
 {
     delete_option('thematic_theme_opt');
     parent::tearDown();
 }
コード例 #7
0
ファイル: test-helpers.php プロジェクト: scottnix/Thematic
 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();
 }