WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/23/2016 12:06:24 AM (3 years ago)
Author:
SergeyBiryukov
Message:

I18N: Add support for Serbian crossed D in remove_accents().

Props Krstarica for the report.
Fixes #38078.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/RemoveAccents.php

    r38193 r38646  
    116116
    117117    /**
    118     * @ticket 37086
    119     */
     118     * @ticket 37086
     119     */
    120120    public function test_remove_catalan_middot() {
    121121        add_filter( 'locale', array( $this, '_set_locale_to_catalan' ) );
     
    127127        $this->assertEquals( 'al·lallalla', remove_accents( 'al·lallaŀla' ) );
    128128    }
     129
     130    public function _set_locale_to_serbian() {
     131        return 'sr_RS';
     132    }
     133
     134    /**
     135     * @ticket 38078
     136     */
     137    public function test_transcribe_serbian_crossed_d() {
     138        add_filter( 'locale', array( $this, '_set_locale_to_serbian' ) );
     139
     140        $this->assertEquals( 'DJdj', remove_accents( 'Đđ' ) );
     141       
     142        remove_filter( 'locale', array( $this, '_set_locale_to_serbian' ) );
     143       
     144        $this->assertEquals( 'Dd', remove_accents( 'Đđ' ) );
     145    }
    129146}
Note: See TracChangeset for help on using the changeset viewer.