mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
I18N: Add support for Serbian crossed D in remove_accents().
Props Krstarica for the report. Fixes #38078. git-svn-id: https://develop.svn.wordpress.org/trunk@38646 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -115,8 +115,8 @@ class Tests_Formatting_RemoveAccents extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 37086
|
||||
*/
|
||||
* @ticket 37086
|
||||
*/
|
||||
public function test_remove_catalan_middot() {
|
||||
add_filter( 'locale', array( $this, '_set_locale_to_catalan' ) );
|
||||
|
||||
@@ -126,4 +126,21 @@ class Tests_Formatting_RemoveAccents extends WP_UnitTestCase {
|
||||
|
||||
$this->assertEquals( 'al·lallalla', remove_accents( 'al·lallaŀla' ) );
|
||||
}
|
||||
|
||||
public function _set_locale_to_serbian() {
|
||||
return 'sr_RS';
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 38078
|
||||
*/
|
||||
public function test_transcribe_serbian_crossed_d() {
|
||||
add_filter( 'locale', array( $this, '_set_locale_to_serbian' ) );
|
||||
|
||||
$this->assertEquals( 'DJdj', remove_accents( 'Đđ' ) );
|
||||
|
||||
remove_filter( 'locale', array( $this, '_set_locale_to_serbian' ) );
|
||||
|
||||
$this->assertEquals( 'Dd', remove_accents( 'Đđ' ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user