Make WordPress Core

Ticket #21007: 21007.2.diff

File 21007.2.diff, 2.0 KB (added by ocean90, 8 years ago)
  • tests/phpunit/data/export/slashes.xml

     
    6565                <wp:is_sticky>0</wp:is_sticky>
    6666                <category domain="category" nicename="alpha"><![CDATA[a \"great\" category]]></category>
    6767                <wp:postmeta>
    68                         <wp:meta_key>Post by</wp:meta_key>
    69                         <wp:meta_value><![CDATA[admin]]></wp:meta_value>
    70                 </wp:postmeta>
    71                 <wp:postmeta>
    7268                        <wp:meta_key>_edit_last</wp:meta_key>
    7369                        <wp:meta_value><![CDATA[1]]></wp:meta_value>
    7470                </wp:postmeta>
     71                <wp:comment>
     72                        <wp:comment_id>1</wp:comment_id>
     73                        <wp:comment_author><![CDATA[Mr WordPress]]></wp:comment_author>
     74                        <wp:comment_author_email></wp:comment_author_email>
     75                        <wp:comment_author_url>http://wordpress.org/</wp:comment_author_url>
     76                        <wp:comment_author_IP></wp:comment_author_IP>
     77                        <wp:comment_date>2011-01-18 20:53:18</wp:comment_date>
     78                        <wp:comment_date_gmt>2011-01-18 20:53:18</wp:comment_date_gmt>
     79                        <wp:comment_content><![CDATA[\o/ ¯\_(ツ)_/¯]]></wp:comment_content>
     80                        <wp:comment_approved>1</wp:comment_approved>
     81                        <wp:comment_type></wp:comment_type>
     82                        <wp:comment_parent>0</wp:comment_parent>
     83                        <wp:comment_user_id>0</wp:comment_user_id>
     84                </wp:comment>
    7585        </item>
    7686</channel>
    7787</rss>
  • tests/phpunit/tests/import/import.php

     
    265265                $this->assertSame( "foo\'bar", $tag1->name );
    266266
    267267                $posts = get_posts( array( 'post_type' => 'any', 'post_status' => 'any' ) );
     268                $this->assertNotEmpty( $posts );
    268269                $this->assertSame( 'Slashes aren\\\'t \"cool\"', $posts[0]->post_content );
     270
     271                $comments = get_comments( array( 'post_id' => $posts[0]->post_ID ) );
     272                $this->assertNotEmpty( $comments );
     273                $this->assertSame( '\o/ ¯\_(ツ)_/¯', $comments[0]->comment_content );
    269274        }
    270275
    271276        // function test_menu_import