WordPress.org

Make WordPress Core

Ticket #18136: Autop-18136.diff

File Autop-18136.diff, 604 bytes (added by jond, 7 years ago)

Autop.php unit test coverage for #18136

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

     
    400400
    401401                $this->assertEquals( $expected, trim( wpautop( $content ) ) );
    402402        }
     403
     404        /**
     405         * wpautop() should ignore spaced content in blocks without line breaks
     406         *
     407         * @ticket 18136
     408         */
     409        function test_spacing_in_blocks() {
     410                $str = "<div><p>123</p> </div>";
     411                $this->assertEquals( "<div>\n<p>123</p>\n</div>", trim( wpautop( $str ) ) );
     412        }
    403413}