Make WordPress Core

Ticket #20444: Autop-20444.diff

File Autop-20444.diff, 652 bytes (added by jond, 10 years ago)

Autop.php unit test coverage for #20444

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

     
    400400
    401401                $this->assertEquals( $expected, trim( wpautop( $content ) ) );
    402402        }
     403
     404        /**
     405         * wpautop() should ignore content without line breaks
     406         *
     407         * @ticket 20444
     408         */
     409        function test_unbroken_lines() {
     410                $str = "<div><p>Hello world</p><span>WordPress</span></div>";
     411                $this->assertEquals( "<div>\n<p>Hello world</p>\n<p><span>WordPress</span></p>\n</div>", trim( wpautop( $str ) ) );
     412        }
    403413}