Make WordPress Core

Ticket #3833: 3833.4.diff

File 3833.4.diff, 1.2 KB (added by jorbin, 10 years ago)

Originally created by MikeHansenMe on #30142

  • tests/phpunit/tests/formatting/Autop.php

     
    400400
    401401                $this->assertEquals( $expected, trim( wpautop( $content ) ) );
    402402        }
     403
     404        /**
     405         * @ticket 3833
     406         */
     407        function test_autop_blockquote_p() {
     408                $input = "<blockquote>This is a blockquote</blockquote>";
     409                $expected = "<blockquote><p>This is a blockquote</p></blockquote>";
     410                $this->assertEquals( $expected, trim( wpautop( $input ) ) );
     411        }
     412
     413        /**
     414         * @ticket 3833
     415         */
     416        function test_autop_content_before() {
     417                $input = 'text before    <div class="whatever"><blockquote>
     418text inside the blockquote tag
     419</blockquote>
     420Some text inside the div embedding the blockquote and after the closing blockquote tag
     421</div>
     422';
     423
     424                $expected = '<p>text before</p>
     425<div class="whatever">
     426<blockquote>
     427<p>text inside the blockquote tag</p>
     428</blockquote>
     429<p>Some text inside the div embedding the blockquote and after the closing blockquote tag</p>
     430</div>';
     431        $this->assertEquals( $expected, wpautop( $input ) );
     432        }
    403433}