Make WordPress Core

Ticket #15006: 15006-unit_test.patch

File 15006-unit_test.patch, 803 bytes (added by jared_smith, 11 years ago)

Unit test

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

     
    400400
    401401                $this->assertEquals( $expected, trim( wpautop( $content ) ) );
    402402        }
     403        /**
     404         * wpautop() should not strip the second </p> tag
     405         *
     406         * @ticket xxxx15006
     407         */
     408        function test_that_wpautop_does_not_remove_closing_p_tags() {
     409                $content  =
     410'<p style="text-align: right;">Text Here</p>
     411<p style="text-align: right;"></p>
     412More Text Here';
     413                $expected =
     414'<p style="text-align: right;">Text Here</p>
     415<p style="text-align: right;"></p>
     416<p>More Text Here</p>';
     417
     418                $this->assertEquals( $expected, trim( wpautop( $content ) ) );
     419        }
     420
    403421}