Make WordPress Core

Ticket #20342: 20342-tests.diff

File 20342-tests.diff, 1.6 KB (added by adamsilverstein, 10 years ago)
  • tests/phpunit/tests/formatting/WPTexturize.php

     
    184184         * @ticket 23185
    185185         */
    186186        function test_spaces_around_hyphens() {
    187                 $this->assertEquals( ' – ', wptexturize( ' - ' ) ); 
     187                $this->assertEquals( ' – ', wptexturize( ' - ' ) );
    188188                $this->assertEquals( ' – ', wptexturize( ' - ' ) );
    189189                $this->assertEquals( ' – ', wptexturize( ' - ' ) );
    190190                $this->assertEquals( ' – ', wptexturize( ' - ') );
    191191
    192                 $this->assertEquals( ' — ', wptexturize( ' -- ' ) ); 
     192                $this->assertEquals( ' — ', wptexturize( ' -- ' ) );
    193193                $this->assertEquals( ' — ', wptexturize( ' -- ' ) );
    194194                $this->assertEquals( ' — ', wptexturize( ' -- ' ) );
    195195                $this->assertEquals( ' — ', wptexturize( ' -- ') );
    196196        }
     197
     198        /**
     199         * @ticket 20342
     200         */
     201        function test_quotes_after_emdash() {
     202                $this->assertEquals( '<p>I also remember the line in &#8220;Casey at the Bat&#8221; when he struck out&#8212;&#8220;There is no Joy in Mudville!!!&#8221;</p>', wptexturize( '<p>I also remember the line in "Casey at the Bat" when he struck out---"There is no Joy in Mudville!!!"</p>' ) );
     203                $this->assertEquals( 'testing <&#8220;Test Quote&#8221;>', wptexturize( 'testing <"Test Quote"> ' ) );
     204                $this->assertEquals( 'Then he said, &#8220;Try using the &#038;&#8221;', wptexturize( 'Then he said, "Try using the &"' ) );
     205        }
    197206}