WordPress.org

Make WordPress Core

Changeset 490 in tests


Ignore:
Timestamp:
12/18/2011 01:08:26 AM (6 years ago)
Author:
dd32
Message:

merge test_strips_entities() in [489]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_formatting.php

    r489 r490  
    902902    function test_strips_entities() {
    903903        $this->assertEquals("no-entities-here", sanitize_title_with_dashes("No   Entities – Here &"));
    904     }
    905 
    906     function test_replaces_nbsp() {
    907         $this->assertEquals("dont-break-the-space", sanitize_title_with_dashes("don't break the space", '', 'save'));
    908     }
    909 
    910     function test_replaces_ndash_mdash() {
    911         $this->assertEquals("do-the-dash", sanitize_title_with_dashes("Do – the Dash", '', 'save'));
    912         $this->assertEquals("do-the-dash", sanitize_title_with_dashes("Do the — Dash", '', 'save'));
    913     }
    914 
    915     function test_replaces_iexcel_iquest() {
    916         $this->assertEquals("just-a-slug", sanitize_title_with_dashes("Just ¡a Slug", '', 'save'));
    917         $this->assertEquals("just-a-slug", sanitize_title_with_dashes("Just a Slug¿", '', 'save'));
    918     }
    919 
    920     function test_replaces_angle_quotes() {
    921         $this->assertEquals("just-a-slug", sanitize_title_with_dashes("‹Just a Slug›", '', 'save'));
    922         $this->assertEquals("just-a-slug", sanitize_title_with_dashes("«Just a Slug»", '', 'save'));
    923     }
    924 
    925     function test_replaces_curly_quotes() {
    926         $this->assertEquals("hey-its-curly-joe", sanitize_title_with_dashes("Hey its “Curly Joe”", '', 'save'));
    927         $this->assertEquals("hey-its-curly-joe", sanitize_title_with_dashes("Hey its ‘Curly Joe’", '', 'save'));
    928     }
    929 
    930     function test_replaces_copy_reg_deg_trade() {
    931         $this->assertEquals("just-a-slug", sanitize_title_with_dashes("Just © a Slug", '', 'save'));
    932         $this->assertEquals("just-a-slug", sanitize_title_with_dashes("® Just a Slug", '', 'save'));
    933         $this->assertEquals("just-a-slug", sanitize_title_with_dashes("Just a ° Slug", '', 'save'));
    934         $this->assertEquals("just-a-slug", sanitize_title_with_dashes("Just ™ a Slug", '', 'save'));
    935     }
    936 
    937     function test_strips_entities() {
    938904        $this->assertEquals("one-two", sanitize_title_with_dashes("One & Two", '', 'save'));
    939905        $this->assertEquals("one-two", sanitize_title_with_dashes("One { Two;", '', 'save'));
     
    944910        $this->assertEquals("onetwo-test", sanitize_title_with_dashes("One&Two Test;", '', 'save'));
    945911    }
     912
     913    function test_replaces_nbsp() {
     914        $this->assertEquals("dont-break-the-space", sanitize_title_with_dashes("don't break the space", '', 'save'));
     915    }
     916
     917    function test_replaces_ndash_mdash() {
     918        $this->assertEquals("do-the-dash", sanitize_title_with_dashes("Do – the Dash", '', 'save'));
     919        $this->assertEquals("do-the-dash", sanitize_title_with_dashes("Do the — Dash", '', 'save'));
     920    }
     921
     922    function test_replaces_iexcel_iquest() {
     923        $this->assertEquals("just-a-slug", sanitize_title_with_dashes("Just ¡a Slug", '', 'save'));
     924        $this->assertEquals("just-a-slug", sanitize_title_with_dashes("Just a Slug¿", '', 'save'));
     925    }
     926
     927    function test_replaces_angle_quotes() {
     928        $this->assertEquals("just-a-slug", sanitize_title_with_dashes("‹Just a Slug›", '', 'save'));
     929        $this->assertEquals("just-a-slug", sanitize_title_with_dashes("«Just a Slug»", '', 'save'));
     930    }
     931
     932    function test_replaces_curly_quotes() {
     933        $this->assertEquals("hey-its-curly-joe", sanitize_title_with_dashes("Hey its “Curly Joe”", '', 'save'));
     934        $this->assertEquals("hey-its-curly-joe", sanitize_title_with_dashes("Hey its ‘Curly Joe’", '', 'save'));
     935    }
     936
     937    function test_replaces_copy_reg_deg_trade() {
     938        $this->assertEquals("just-a-slug", sanitize_title_with_dashes("Just © a Slug", '', 'save'));
     939        $this->assertEquals("just-a-slug", sanitize_title_with_dashes("® Just a Slug", '', 'save'));
     940        $this->assertEquals("just-a-slug", sanitize_title_with_dashes("Just a ° Slug", '', 'save'));
     941        $this->assertEquals("just-a-slug", sanitize_title_with_dashes("Just ™ a Slug", '', 'save'));
     942    }
     943
    946944}
    947945
Note: See TracChangeset for help on using the changeset viewer.