WordPress.org

Make WordPress Core

Changeset 282 in tests


Ignore:
Timestamp:
12/22/09 17:01:53 (4 years ago)
Author:
westi
Message:

Add a simple import with serialized postmeta test case which hilights the issue in WP#10619.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_import_wp.php

    r200 r282  
    28332833} 
    28342834 
     2835class TestImportWP_PostMeta extends _WPEmptyBlog { 
     2836 
     2837    var $posts = NULL; 
     2838 
     2839    function setUp() { 
     2840        parent::setUp(); 
     2841        include_once(ABSPATH.'/wp-admin/import/wordpress.php'); 
     2842        if ( !defined('WP_IMPORTING') ) 
     2843            define('WP_IMPORTING', true); 
     2844    } 
     2845 
     2846    function tearDown() { 
     2847        parent::tearDown(); 
     2848        if ($id = get_profile('ID', 'User A')) 
     2849            wp_delete_user($id); 
     2850    } 
     2851     
     2852    function test_serialized_postmeta_no_cdata() { 
     2853        $this->knownWPBug(10619); 
     2854        $html_output = get_echo( array(&$this, '_import_wp'), array( DIR_TESTDATA.'/export/test-serialized-postmeta-no-cdata.xml', array('User A') ) ); 
     2855        $expected["special_post_title"] = "A special title"; 
     2856        $expected["is_calendar"]= ""; 
     2857        $this->assertEquals($expected, get_post_meta(122, 'post-options', true)); 
     2858    } 
     2859} 
    28352860?> 
Note: See TracChangeset for help on using the changeset viewer.