Make WordPress Core


Ignore:
Timestamp:
07/01/2012 06:30:34 PM (13 years ago)
Author:
kurtpayne
Message:

Port AJAX tests to new test runner. Fixes #51 and #46. props duck_.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-testcase/test-ajax-actions/test_admin_ajax_dim_comments.php

    r722 r833  
    11<?php
    2 
    3 /**
    4  * Get WPAjaxTestCase class
    5  */
    6 require_once( DIR_TESTCASE . '/test_admin_includes_ajax_actions.php' );
    72
    83/**
     
    1914 * @group      Ajax
    2015 */
    21 class TestAjaxCommentsDim extends WPAjaxTestCase {
     16class TestAjaxCommentsDim extends WP_Ajax_UnitTestCase {
    2217
    2318    /**
     
    3126     */
    3227    public function setUp() {
    33         parent::setUp();   
    34         $this->_comments = get_comments(array(
    35             'status'  => 'all',
    36             'search'  => '',
    37             'user_id' => '',
    38             'offset'  => 1,
    39             'number'  => 20,
    40             'post_id' => 0,
    41             'type'    => '',
    42             'orderby' => '',
    43             'order'   => ''
    44         ));
     28        parent::setUp();
     29        $post_id = $this->factory->post->create();
     30        $this->_comments = $this->factory->comment->create_post_comments( $post_id, 15 );
     31        $this->_comments = array_map( 'get_comment', $this->_comments );
    4532    }
    4633
Note: See TracChangeset for help on using the changeset viewer.