WordPress.org

Make WordPress Core

Changeset 325 in tests


Ignore:
Timestamp:
01/18/11 18:49:38 (4 years ago)
Author:
duck_
Message:

Remove post_category fields from SQL dump. See #13

Location:
wp-testdata
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testdata/sample_blogs.php

    r323 r325  
    44// don't forget to call parent::setUp() and parent::tearDown() if you override them 
    55 
    6  
    76// an empty blog 
    8  
    97class _WPEmptyBlog extends WPTestCase { 
    108    var $post_ids = array(); 
     
    2927        $this->assertTrue($this->_setup_check, get_class($this).' did not call parent::setUp()'); 
    3028    } 
    31  
    32  
    3329} 
    3430 
     
    6359             
    6460        require_once DIR_TESTDATA . '/plugins/wordpress-importer/wordpress-importer.php'; 
    65  
    6661        $this->_import_wp( DIR_TESTDATA.'/'.$this->import_filename ); 
    6762    } 
     
    7065// a faster way to get the asdftestblog1 dataset than using the importer 
    7166class _WPDataset1 extends _WPEmptyBlog { 
    72      
    7367    function setUp() { 
    74         $_start = time(); 
    7568        parent::setUp(); 
    76  
    7769        $this->_nuke_main_tables(); 
    78              
    79         $this->_load_sql_dump(DIR_TESTDATA.'/export/asdftestblog1.2007-11-23.sql'); 
     70        $this->_load_sql_dump(DIR_TESTDATA.'/export/asdftestblog1.2007-11-23.fixed.sql'); 
    8071    } 
    8172     
    8273    function tearDown() { 
    83         $_start = time(); 
    8474        $this->_nuke_main_tables(); 
    8575        parent::tearDown(); 
    86         if ($id = get_profile('ID', 'User A')) 
    87             wp_delete_user($id); 
    88         if ($id = get_profile('ID', 'User B')) 
    89             wp_delete_user($id); 
    9076    } 
    9177     
    9278    function _nuke_main_tables() { 
    9379        global $wpdb; 
    94          
    9580        // crude but effective: make sure there's no residual data in the main tables 
    9681        foreach ( array('posts', 'postmeta', 'comments', 'terms', 'term_taxonomy', 'term_relationships', 'users', 'usermeta') as $table) 
    9782            $wpdb->query("DELETE FROM {$wpdb->$table}"); 
    9883    } 
    99      
    10084} 
    10185 
Note: See TracChangeset for help on using the changeset viewer.